Basic Connection class for connecting to mongodb