// when dom is ready
document.addEventListener("DOMContentLoaded", function() {
// Label Vier Security: Adding hidden field to the wp-login form.
// add a hidden field to the login form
var today = new Date();
var dd = today.getDate().toString();
var mm = (today.getMonth()+1).toString(); //January is 0!
var yyyy = today.getFullYear().toString();
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = yyyy+mm+dd;
var valid_login = document.createElement("input");
valid_login.setAttribute("type", "hidden");
valid_login.setAttribute("name", "valid_login");
valid_login.setAttribute("value", today);
// get the form inside the div with id login
document.querySelector("form").appendChild(valid_login);
});