move some variables from session to request scope
Merge bugfix from tommi.