Login in web console

Hello, I have a project in which I have to log in with javascript commands, and I can’t find the forms that is sent to log in.

Commands I use:

document.getElementsByName('username').value = 'username'
document.getElementsByName('password').value = 'password'
document.forms['FORMNAME'].submit()

And I don’t find FORMNAME

Hoping that someone can help me,
Laakiin