fixed npe for a user that is not logged in