i believe session_register() is deprecated as of 4.1.0.
just use
$_SESSION['variable']='value';
also use
unset($_SESSION['variable']);
instead of session_unregister()
then use this to test for it.
if(isset($_SESSION['variable'])){
echo 'its set';
} else {
echo 'it isn't set';
}
you could set a session variable to the current time in seconds then compare it when the next page is loaded, instead of relying on the session cookie lifetime.