well i havent done much with the sessions stuff in PHP4 (which is all built in), i actually made my own sessions system in php3..
you just need to setup a database table called sessions that contains user_id, session_id, time. Then when someone logs in, you assign them a session id and input into the sessions table the userid, session you created, and the time they logged in.
Then you pass the session variable between each page (eg. products.php?sid=$session_id). Then at the top of each page you just lookup the session and make sure its in the session table you created, then you know who is logged in. You can even put a session timeout limit in there. When you are checking the session on each page, just make sure the time was less than X mins/hours ago. Then just make sure you put some sort of sessions cleanup thing in your logoff scripts.
There should be plenty more information on this site to figure it all out (afterall, thats how i found out).