Added some validations and tests to the users model