title: ajax always going to success
body: <p>I'm having troubles with ajax. my code runs well, but then, it always goes to success.</p>
  
  <pre><code>dataLogin = 'mail=' + $('#login_mail').val() + '&amp;pass=' + $('#login_password').val() + '&amp;on=' + manter_ligado;
  
  $.ajax({ url: 'modules/login.php?' + dataLogin,
    type: 'POST',
    //data: dataLogin,
    data : {
      mail : $('#login_mail').val(),
      pass : $('#login_password').val(),
      on : manter_ligado
    },
    success: function(data) {
      alert(data);
    },
    error: function(XMLHttpRequest, textStatus, errorThrown) {
      alert("Status: " + textStatus); alert("Error: " + errorThrown); 
    }
  });
  </code></pre>
  
  <p>can anyone help me with this?
  Also, I'm using sublime to code, and it gives me some errors on the ajax, but I can't seem to correct them, it might help knowing this</p>
  
  <p>Also, I know that the php works, because I can make the login on the website, but the problem I have is when the user/pass is incorrect</p>