added uniqueness contstraint for user PIN
added pin validations, auto-generation of pins and editing to users