handle error or null user from mongo