add validations and test cases to the user model