added validation for users and pins