fixed a small bug when user not logged in