Mongoose Connection cant be established using Mlab

nodejs
mongodb

#1

Part of my code has this :

var mongoose = require('mongoose');

mongoose.connect('mongodb://test:test@ds147900.mlab.com:47900/chat-db');

mongoose.connection.once("open", function(){
    console.log("Connection Estabilished")
})

And i run mongod on one terminal and then when i run node index on another i get :

Listening at IP:PORT 0.0.0.0:8080

events.js:141
      throw er; // Unhandled 'error' event
      ^
MongoError: Authentication failed.
    at Function.MongoError.create (/home/ubuntu/workspace/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
    at /home/ubuntu/workspace/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:489:72
    at authenticateStragglers (/home/ubuntu/workspace/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:435:16)
    at null.messageHandler (/home/ubuntu/workspace/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:469:5)
    at Socket.<anonymous> (/home/ubuntu/workspace/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:321:22)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:537:20)

Here is the URL To my public workspace : https://ide.c9.io/amanuel2/learn-nodejs