xt);
            }
            
        }
    };

    XHR.open('POST', '//localhost:10005/login?format=json');
    XHR.setRequestHeader('Content-Type','application/json' );

    // The data sent is what the user provided in the form
    XHR.send(json);
});
document.getElementById('register').addEventListener('submit', (e) => {
    e.preventDefault();

    const formData = new FormData(e.target);
    const data = Array.from(formData.entries()).reduce((memo, pair) => ({
        ...memo,
        [pair[0]]: pai