Instagram Javascript login not works : Go to login page:
https://www.instagram.com/accounts/login/

Execute:

    document.getElementsByTagName('input')[0].value = 'login';
    document.getElementsByTagName('input')[1].value = 'password';

We can see our password:

    document.getElementsByTagName('input')[1].type = "text";

Click "Enter":

    document.getElementsByTagName('button')[0].click();

What is wrong?