implement the save/load session api for cygoose.