How to login into Drupal 8 using Ajax (REST API) I want to login in my Site Drupal 8.2.3 from another application using Ajax,
but is returning error all the time.

$.ajax({
    url : "http://localhost/Drupal-tuto-test/user/login",
    type : 'POST',
    data: {
        'username' : 'admin',
        'password' : 'admin'
    },
    dataType : 'json',
    error : function(data) {
        console.log('Error ',data);
    },
    success : function(data) {
        console.log('Success ',data);
    }
});
Your POST data isn't correct, you should be using "user" and "pass". For a a more complete response, see my answer here.