Fix for MongoDB connection timeout

The connection to MongoDB was timing out on the server, rendering the application useless. This fix renews the connection before ever request is processed.