Added mongodb connection handler.