Sounds like you need a session keyed stack. Have a look at the various Apache:: modules to store session based info, and you'll need some kind of shared caching structure (eg IPC::SharedCache). You might want to have a look at mod_perl too: the various Auth modules work really well for "click-path" security, ie remembering where you wanted to go before the login screen popped up.