title: TypeError: db.authenticate is not a function
body: <p>I'm new with mongoDB thing and I'm not sure what I'm doing wrong. 
  MongoDB have username and password.
  Here is my code:</p>
  
  <pre class="lang-js prettyprint-override"><code>const mongo = require('mongodb').MongoClient;
  
  mongo.connect('mongodb://localhost:27017', {useUnifiedTopology: true}, (err, client) =&gt; {
  
    var db = client.db('Website');
  
    db.authenticate('username', 'password', function(findErr, result) {
      if (findErr) throw findErr;
      });
  
    db.collection('Games').findOne({}, function (findErr, result) {
      if (findErr) throw findErr;
      console.log(result.name);
      client.close();
    });
  });
  </code></pre>
  
  <p>I tried to use it like this <code>db.authenticate('username', 'password');</code></p>
  
  <p>But all I get is <code>TypeError: db.authenticate is not a function</code> .</p>