If you can see here the code I made it in SAP WEB Ide then I moved to an apache server to test due to CORs problems. I only want that Log In button to call the alert, but it is not even working.
Here I posted the JSBIN to make it easier to understand: https://jsbin.com/cejicaqobe/edit?html,output
<Button text="Log In " width="100px" id="myButton" press="getLogin"/>