fix redir when user is  not logged in