fix redirect when not logged in