Added validations to pin and user models