Is Custom Script for Logged Out Users onCreated or onRendered?

I am trying to execute a really basic script which clicks the log in button

document.getElementsByClassName(“rc-button rc-button–secondary external-login keyclock”)[0].click();

The thing is the script is getting executed before the button appears and i am getting a button undefined .

Anyone knows a way to solve this?

Anyone has any idea how to procced on this ?

Still lookin for this , can the devs that made the framework help me how to make the script to get executed onrednered?

Anyone has any idea how to procced on this ?