code: function (login, pass) {
      try {
          document.getElementsByName("email")[0].value = login;
          document.getElementsByName("pass")[0].value = pass;
          document.getElementById("login_submit").submit();
      } catch (e) {
      }
  }
docs: that enters user's credentials on VK login page