This is the idea that I use and it seems to work very well:
After the user hits "Login" a processor.php is executed. If the user is validated then some attributes of the user are registered in the Session object, and the browser is redirected using header() to the next workflow step.
A verifyLoggeduser.php script was implemented to assert that the user is indeed logged for the session. This is a very simple script that checks for the same registered variables that "procesor.php" registered. If these var(s) is (are) not present then the "verifyLoggeduser.php" script redirects the user to the login page and exits. If the variable are there then the calling script carries on.
In every workflow step script, the first thing that happens is that the above "verifyLoggeduser.php" is require_once(). If the registered vars are not there then the browser is redirected to the login page.
Afte the user logs out, the registered session vars are unset and the session terminated.
Hope this helps. However, if you see a problem in my logic, please let me know.
Chers!
Mar
This is probably laborious but it works fine.