fix routes for sessions and redirection