validate if user logged in to redirect