Using XMLHttpRequest() to send data at backend.