var inputs = form.getElementsByTagName('input');
var map = [];
map['email'] = 'login';
map['password'] = 'password';
var send = {};
try {
for( var route in map) {
send[route] = inputs[map[route]].value;
}
} catch (err) {
console.log(err);
return;
}