pull session management into a 'class'