Hello again, found it. I have changed the childNodes at the bottom so the first is [0] instead of [1]

document.getElementById(‘loginform’).childNodes[0].childNodes[1].childNodes[0].nodeValue = ”;

Hope this is useful.