Revert "Fixed sessions serialization."

This reverts commit 4b9dfd11c2fc430f3070237129685bd3e234f811.
Trying to fix mess that happened after pull request.