Fixes datatype conversion of cookie while reading its value.

Fixes also user loading for being used by s2mapper.