Added some validations to the user controller and model