adding in input validation for registration process. tricky because during failed attampts either PasswordModel or UserModel instances need to be removed in the cleanup.