eElement("h3");
				const textNode = document.createTextNode("Username or password incorrect");
				h3.appendChild(textNode);
				document.getElementById("result").appendChild(h3);
			}
		}
	};
	var data = JSON.stringify({
		"user": document.getElementById("user").value,
		"password": document.getElementById("password").value});
	xhr.send(data);
}

document.getElementById('password').onkeydown = function(e){
	if (e.keyCode == 13) {
		// Handle return key
		submitform();
	}
};

</script>
</body>
</html>
