add cookie method, ssl verify peer option and some cookies code fixes