undoing a868f03e09fe69c61ad4fbfe88324306322e2a7b - sessions stuff
redoing some of the stuff that got undone in revert