Added validations to user model.