Fixed incorrect redirect when user is logged out mid session.