title: remote mongo authentication issue using mongoose on a node app
body: <p>trying to get node-passport-mongoose to connect to remote mongodb using authentication.</p>
  
  <p><strong>The node app connection works fine when remote mongodb auth is turned off using:</strong></p>
  
  <p>module.exports = {
      'url' : 'mongodb://pubip:27017/test'
  };</p>
  
  <p><strong>With remote mongo auth turned on - I can then successfully login from the local shell with:</strong></p>
  
  <p>mongo pubip:27017/test -u dave -p password</p>
  
  <p><strong>but if I then update my database.js config in my node app to this:</strong></p>
  
  <p>module.exports = {
      'url' : 'mongodb://dave:password@pubip:27017/test'
  };</p>
  
  <p><strong>I get this:</strong></p>
  
  <p><em>/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/lib/server.js:228
          process.nextTick(function() { throw err; })
                                              ^
  Error
      at Error.MongoError (/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:13:17)
      at Server.destroy (/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:629:47)
      at Server.close (/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/lib/server.js:344:17)
      at Db.close (/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/lib/db.js:267:19)
      at /home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/lib/db.js:196:12
      at null. (/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/lib/server.js:226:9)
      at g (events.js:180:16)
      at EventEmitter.emit (events.js:98:17)
      at null. (/home/ubuntu/semblent/passport/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:238:68)
      at g (events.js:180:16)</em></p>
  
  <p><strong>Any tips appreciated !!</strong></p>