I disagree with two concepts people have said in this post:
1) trying to win every session- Obviously this is a terrible idea because once you've lost a certain amount (different for each person) you're no longer playing your A-game.
2) Playing a certain number of hands- I think this is just as bad because it just all depends on your mindset while you're playing. Some days I feel confident in myself and am playing well... on these days I can keep playing even if I start by dropping 5 BI. Other days I'm just not feeling like I'm playing well, so I stop after 30m or something even if I'm currently up a BI or two.
It is true that I find I'm usually playing better while I'm winning, so I end up playing longer on my winning sessions.
My point is that I don't think you should force yourself to play a certain number of hands or stop based on a pre-set amount of winnings/losses. I think you need to learn how to feel when you're either on tilt or just not playing your A-game... then have the discipline to stop (unfortunately I know from experience that it's easier said than done

)