const fields = document.querySelectorAll("input");
const button = document.querySelector("[value='login']")

function manageButtonState() {
    for (const field of fields) {
        if (field.value === "") {
            button.setAttribute("disabled", "")
            return
        } else {
            button.removeAttribute("disabled")
        }
    }
}

for (const field of fields) {
    field.addEventListener("input", manageButtonState)
}