Working serialization and deserialization of sessions to couchbase.