write registered to cookie