 + document.location.hash);

    $('#login-dialog')
        .on('shown', function() { // input:read-write:visible:first fails
            $(this).children('.modal-dialog').children(':visible').find('input.autofocus').focus();
        });

    $('.login-form.mechanism')
        .submit(function(e, submit) {
            if (submit == 'post') {
                return true;
            }
            var self = this;
            if (require_el(self.elements.username) && require_el(self.elements.password)) {
    