Well yeh thats how sessions work, they're designed that way so that an unknowing user doesn't accedently log themselves out by pressing the wrong button.
What you can do is lower the session time out value in php.ini, or you could check the value of the server variable HTTP_REFERER and if the page wasn't linked to by an internal page then you can have the script ask for the login credentials again.
FYI the best way to get this value is using the $GLOBALS array as such:
$GLOBALS["HTTP_REFERER"]