title: MongoDB: findOne returns null but document exists in collection
body: <p>I'm trying to send an email and password server-side and check if a document with those values exists (which it does), but when I console log the <code>results</code> from the query it's null.</p>
  
  <p>Here's the document in the <code>users</code> collection:</p>
  
  <pre><code>{
      "_id" : ObjectId("580bcf9874ae28934705c0fc"),
      "email" : "johndoe@gmail.com",
      "password" : "pass"
  }
  </code></pre>
  
  <p>Here's what I'm sending server-side:</p>
  
  <pre><code>{"email":"johndoe@gmail.com","password":"pass"}
  </code></pre>
  
  <p>Here's my code (updated):</p>
  
  <pre><code>mongo.connect('mongodb://localhost:27017', function (err, db) {
  
      if (err) {
      console.log("error: " + err); // logs nothing
      } else {
  
          var users = db.collection("users");
          var tasks = db.collection("tasks");
  
          app.post("/login", function(req, res) {
  
              var emailRegex = /^(([^&lt;&gt;()\[\]\\.,;:\s@"]+(\.[^&lt;&gt;()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
              var userInDb;
              var userEmail = req.body.email;
              var userPassword = req.body.password;
  
              console.log(req.body.email); // logs "johndoe@gmail.com"
              console.log(req.body.password); // logs "pass"
  
              if (!userEmail || !userPassword) {
                  return res.sendStatus(403);
              } else if ( !emailRegex.test(userEmail)) {
                  return res.sendStatus(403);
              } else {
  
                  users.findOne( { "email": userEmail, "password": userPassword }, function(err, results) {
  
                      console.log(results); // logs "null"
  
                      if(err) {
                        console.log("error: " + err); // logs nothing
                        res.sendStatus(403);
                      } else {
                        console.log("here"); // logs "here"
                        res.sendStatus(200);
                      }
  
                    });
                }
            });
         }
      });
  </code></pre>