'Connect to a MongoDB.
:Parameters:
- `host`: hostname
- `port`: port
- `user`: collection username
- `password`: collection user password
- `database`: name of the database
- `collection`: name of the collection
- `extra`: parameters to pymongo.MongoClient not listed above'

def __init__(self, **kwargs):

    super(MongoBackend, self).__init__(**kwargs)
    host = kwargs.get('host', 'localhost')
    port = kwargs.get('port', 27017)
    user = kwargs.get('user', '')
    password = kwargs.get('password', '')
    db_name = kwargs.get('database', 'track')
    collection_name = kwargs.get('collection', 'events')
    extra = kwargs.get('extra', {})
    extra['w'] = extra.get('w', 0)
    extra['tz_aware'] = extra.get('tz_aware', True)
    self.connection = MongoClient(host=host, port=port, **extra)
    database = self.connection[db_name]
    if (user or password):
        database.authenticate(user, password)
    self.collection = database[collection_name]
    self._create_indexes()
