Don't use a global session

It should be possible to support multiple sessions; move away from a
global to use an object property.