Added mongo database connection.
Tweaked middleware logging.