refactors session initialization.
refactors session initialization.

birkin/easyscan,Brown-University-Library/easyscan,birkin/easyscan,Brown-University-Library/easyscan,Brown-University-Library/easyscan,birkin/easyscan