Connect to mongodb