make cookie serializable