title: XMLHttpRequest: POST request status
body: <p>I have such part of code:</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open("POST", "http://someurl.com", true);
  xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4) {
      if (xhr.status == 200) {
        doSomeTask();
      }
    }
  }
  xhr.send('login=mylogin&amp;password=mypassword');
  </code></pre>
  
  <p>How can I know if my login&amp;password are correct? In both cases xhr.status is 200.</p>