All you really need to do is test to see if any variables you've registered with your session are there. For example, if after you create a session, you register $uid and then ask the user for their user id, you would then assign the result to $uid, correct?
Just test for the variable after initiating the session, if the variable has a value, then the session has not expired. If the variable == "" then the session had expired and a new one was created. After that you just use an if statement to direct the user to the proper location (ie the page, or the login form)
--kinadian