Hi,
I've been building many user-interactive sites in the past year, and I found that the best way you can track users is through a session id. Basically, once the user has logged in, generate a random session ID (or use PHP4 sessions) and put this ID in your users table. Then, store this ID as a cookie in the client's browser. This way on every page, you can compare their stored session_id with the one in the database and if it is the correct user and the session_id is valid, you can say the person is logged in. Otherwise just ask them to login again.
if you would like me to post examples, let me know.
hope this helps!
-sridhar