code: function post_login(urlStr, username, password, token, next) {
  
      assert(_.isFunction(next));
  
      var p = url.parse(urlStr);
  
  
      var http_protocol;
      if (p.protocol === "https:") {
          http_protocol = https;
      } else {
          http_protocol = http;
      }
  
      var options = {
          host: p.hostname,
          path: url.resolve(p.pathname, "login"),
          method: "POST",
          user_agent: "Mozilla/5.0"
  
      };
  
      var req = http_protocol.request(options, function (res) {
          // console.log('STATUS: ' + res.statusCode);
          // console.log('HEADERS: ' + JSON.stringify(res.headers,null," "));
  
          res.setEncoding('utf8');
  
          res.on('data', function (chunk) {
              //xx data += chunk
          });
          res.on('end', function () {
  
  
              var selected_elements = res.headers["set-cookie"].filter(function (str) {
                  //  1234567890123456
                  return str.substr(0, 16) === "_redmine_session";
              });
  
              assert(selected_elements.length === 1);
              var _cookie_session = selected_elements[0] + "; domain=" + p.hostname;
              next(null, _cookie_session);
          });
      });
  
      req.on('error', function (err) {
          console.log('problem with request: '.red + err.message);
          next(err);
      });
  
      // write data to request body
      req.write("username=" + username + "&password=" + password + "&authenticity_token=" + token + "\n");
      req.end();
  
  }
docs: /* callback receive cookie