Added more configuration options for mongodb connection.