added method for listing cookies; explicitly close curl handle after each request to flush cookie file, allowing it to be deleted properly at the end as well as read after a single request