Refactored Session and SessionPool logic for adding MongoDB