added validations for users and pins