title: Get information beyond login page in Node/Express not working
body: <p>Sort of a weird situation here. I'm building a backend and frontend which talks  to a third party RESTFUL API that controls some hardware. The third party api is installed on your local system as a webserver, so to make HTTP requests you would direct them towards "localhost".</p>
  
  <p>The main problem is after some changes the hardware has to be updated by logging into the webserver and clicking the "update hardware" button, this pushes all the newest changes to the actual hardware. Unfortunately the API doesn't have any default calls/commands for doing this.</p>
  
  <p>After running through the files I found that I can refresh a door by simply making a GET request to<code>http://localhost/IntelliM/DoorsConfig/DownloadChangeForAllDoors.ashx</code>
  If I enter this into my browser it updates the hardware perfectly.</p>
  
  <p>The problem is that access to this page requires a login, which I've been trying to achieve through this code</p>
  
  <pre><code>/* update door */
  router.get('/updatedoor', function (req, res) {
      request.post({
          headers: {'content-type' : 'application/x-www-form-urlencoded'},
          url:     "http://localhost/IntelliM/login/index.ashx?",
          body:    "password=admin&amp;username=admin"
      }, function(error, response, body){
          //Here is where I would make a GET request to doorupdate mentioned earlier
          console.log(body);
      });
  });
  </code></pre>
  
  <p>When I log the body, or have it displayed on a page, I get a large body response with most of it not really mattering besides these two lines:</p>
  
  <pre><code>Username: &lt;input type="text" id="username" name="username" value="" /&gt;
  Password: &lt;input type="password" id="password" name="password" value="admin" /&gt; 
  </code></pre>
  
  <p>It looks like the page isn't even getting my "username" value and just returning the body of the page I would get with only the "password" input filled in.</p>
  
  <p>I'm trying to get it to log the page I would normally see after logging in, because then I would know the login worked and I could then make a GET request to the page I need to.</p>
  
  <p>EDIT: For context the hardware is a door controller and the changes that have to be pushed are adding a user that can access a door.</p>
  
  <p>EDIT FULL BODY:</p>
  
  <pre><code>    &lt;form id="loginForm" action="/IntelliM/login/login.ashx" method="post"&gt;
      &lt;fieldset id="loginFieldSet"&gt;
              &lt;legend id="loginFieldSetLegend"&gt;Authentication&lt;/legend&gt;
              &lt;div id="loginFieldSetFields"&gt;
                      &lt;p id="loginFieldSetUsername"&gt;Username: &lt;input type="text" id="username" name="username" value="" /&gt;&lt;/p&gt;
                      &lt;p id="loginFieldSetPassword"&gt;Password: &lt;input type="password" id="password" name="password" value="admin" /&gt;&lt;/p&gt; &lt;input type="hidden" id="ReturnUrl" name="ReturnUrl" value="/IntelliM/default.aspx" /&gt;
                      &lt;p id="loginFieldSetButton"&gt;&lt;input type="submit" value="Login" id="submit" /&gt;&lt;/p&gt;
              &lt;/div&gt;
      &lt;/fieldset&gt;
      &lt;div id="loginFormRegister"&gt;Your system is licensed for Intelli-M Access&lt;/div&gt;
  </code></pre>
  
  <p></p>