title: MeteorJS: Match failed in Meteor.loginWithPassword()
body: <p>I’m using accounts-password with email (instead of username). Very few users are getting an error logging in, so I’m finding it difficult to identify the issue. They are getting a <code>“match failed”</code> when I call <code>Meteor.loginWithPassword(email,password)</code>:</p>
  
  <pre><code>Exception while invoking method 'login' Error: Match error: Match error: Failed Match.Where validation in field username in field user.username at check (packages/check/match.js:35:15) at MethodInvocation.&lt;anonymous&gt; (packages/accounts-password/password_server.js:266:3)...
  </code></pre>
  
  <p>It's not clear to me why it's trying to match username. I changed the call to use email explicitly, <code>Meteor.loginWithPassword({email:email},password)</code> , and get the same error, except the match fails on email:</p>
  
  <pre><code>Exception while invoking method 'login' Error: Match error: Match error: Failed Match.Where validation in field email in field user.email
   at check (packages/check/match.js:35:15)
   at MethodInvocation.&lt;anonymous&gt; (packages/accounts-password/password_server.js:266:3)
  </code></pre>
  
  <p>I cannot reproduce this on demand (so hard to debug), but it does seem to happen to specific users, but not all the time. I am certain that the user is correctly entering email/password (and even if not, the error would not be a match failed). The email domains are restricted, so it's not an unusual email address or anything like that. </p>
  
  <p>I am using accounts-password@1.5.0 with meteor 1.6.1.2. This does seem similar to <a href="https://stackoverflow.com/questions/41600480/meteor-accounts-loginwithpassword-400-match-failed-error">Meteor Accounts.loginWithPassword &quot;400 Match Failed&quot; Error</a>, but I am not using the same package that was causing the issue there. Any help would be greatly appreciated!</p>