Refactor to open the mongo session on app start where it belongs