title: Alfresco login api giving Bad Request 400
body: <p>I am trying to login to alfresco through api. I do not know why it is returning error 400 Bad Request. 
  The json should be correct and in my ajax call I have also set the content type to 'application/json'.</p>
  
  <p>This is my ajax call.</p>
  
  <pre><code>var jsonData = JSON.stringify({ username : usernameV, password : passwordV });
  
  var request = $.ajax({
      settings : {contentType:'application/json'},
      type: "POST",
      url: "http://---ip---/alfresco/service/api/login",
      data: jsonData
  });
  </code></pre>
  
  <p>The json string in the console.</p>
  
  <pre><code>{"username":"admin","password":"admin1"} 
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>400 Bad Request 
  Request sent by the client was syntactically incorrect
  </code></pre>
  
  <p>Message in responseJSON object</p>
  
  <pre><code>Unable to parse JSON POST body: A JSONObject text must begin with '{' at character 0"
  </code></pre>