fix serialize/deserialize of user