check if there is a user logged in before redirect