A little refactoring to handle creating and resuming sessions