Move Session context manager to its own module