Connecting to mongo db.