The idea for that opening is to get you to play 5... Nxd5 so white can sacrifice the knight like he did. Typically the black king will take the knight (as you did)then move to e6 to protect his knight so he can be up in material. White's goal is to lure the king out to the middle of the board and attack attack attack. I've seen your way of playing the opening a lot too...that is, moving the king back to e8 after taking the white knight and accepting the loss of the f pawn and the ability to castle. Here's what I've learned is the way to defend.
It can go a few ways from there. I'm sure other people have other ways of dealing with it too. I hope that helps.
I had some trouble with this opening...I still managed to win but I need to see what I did wrong.