User Login: login failed: 400 Bad Request
try 

const headers= new Headers({ 
  'Content-Type': 'application/json',
  'X-CSRF-Token': 'Qfnczb1SUnvOAsEy0A_xuGp_rkompgO2oTkCBOSEItM',
  'Authorization': 'Basic Qfnczb1SUnvOAsEy0A_xuGp_rkompgO2oTkCBOSEItM'
})

let options = new RequestOptions({ headers: headers });

login (user: User): Observable&lt;User&gt; {
  const url = `${this.mainUrl}/user/login?_format=json`;  
  return this.http.post(url, user, options ).map((res)=&gt;{console.log(res)});      
}