Generate a proper cookie.