add session clearing support. Closes #9