basic cookie building / parsing for lua