Cleanup mongodb authentication

It is necessary to authenticate to the database before accessing a
collection.