created and added validations to user model