<form id="login-form">
    <label>Secret</label>
    <input id="password" type="password" />
    <input type="submit" />
</form>

<script>
    $("#login-form").submit(function(evt) {
      evt.preventDefault();
      var kernel = IPython.notebook.kernel
      kernel.execute("{varName}='"+$("#password").val()+"'")
      console.log("{varName}='"+$("#password").val()+"'")
    })
</script>
