Redirect: fixing exception when reloading a page after authentication.