connection.query('select * from users where login = "' + req.body.login + '"', function(err, result){
console.log(result[1]);
if(req.body.password == result.password)
{
connection.end();
res.send('Пользователь авторизирован!');
}
else
{
connection.end();
res.send('test');
}
});