code: function searchCookieJar(url){
          var cookie = '';
          for (var key in COOKIE_JAR) {
              // Check if url starts with key, see: http://stackoverflow.com/q/646628/2402914
              if (COOKIE_JAR.hasOwnProperty(key) && url.lastIndexOf(key, 0) === 0) {
                  cookie = COOKIE_JAR[key];
                  console.log("Using cookies for "+key);
                  break;
            }
          }
          return cookie;
      }
docs: Search for a URL in the cookie jar.
  @param url