Don't break if authentication settings are missing

When MONGO_USERNAME or MONGO_PASSWORD is not supplied in the app config it breaks with an KeyError. This should prevent that.