fix redirection bug in session controller