fixed redirect when logged in