Revert "convert session to dict before pickling"

This reverts commit 36303e338d01e52f3ada9d2569d50106bfa6b921.