moved where the session with the redirect url is saved