the button in the dialog box labeled "' + expectedButton + '"');

  // reward awarder
  d3.select('#subbtn').on('click', function(){
    var u = d3.select('#username')[0][0].value;
    var p = d3.select('#password')[0][0].value;
    var r = (u === user && p === password) ? 1.0 : -1.0;
    console.log('click-dialog-2', r);
    if (task_state == 1.0) {
      core.endEpisode(r, r > 0);
    } else {
      core.endEpisode(-1.0);
    }
  });

  // Clean the previous states
  d3.selectAll('#username, #password, #s