Open a modal and awaits.
See the source of this page for a complete explanation of the code.
alert('...');
yield new Snippet.BsShowModal('#login-modal');
var user = $('#user-name').val();
var pass = $('#user-password').val();
yield bsAlert('...');
yield bsAlert('...');