Fix errors when user not logged in.