Adding support for MongoDB authentication.
Attempt at logging connection errors. This doesn't help much though, because this doesn't have access to the request.