How to login and auto open previous lesson

Hi guys, i am a facing a problem using Shared Object. I am developing a courseware. I could login using SO. but how do I keep track of the lessons that the user is on, so that the next time the user logs in, he can choose to start where he last stopped? any idea how to do this? thanks guys