Revert "custom session middleware for json cookie"

This reverts commit 95a0dfc91aeb0f5edc5108c8d4797d23a8533904.