Some improvements to user model