$('#btn-login, button[name=login-button], #frmloginbox button[type=submit]').click(function (e) {
    e.preventDefault();
    $(this).attr('disabled', 'disabled').addClass('disabled');
    var self = $(this);
    var url = $('input[name=verifyUnifiedLogin]').val();
    var userType = $('input[name=userType]').val();
    var username = $('#loginform-username').val();
    var password = $('#loginform-password').val();
    if (userType != '' && username != '' && password != '') {
        $.ajax({
            type: 'POST',
            url: url,
            cache: false,
            data: {
                username: username,
                password: password,
                userType: userType
            },
            success: function () {
                // zero index to prevent trigger click event again after submission
                self.closest('form')[0].submit();
            }
        });
    } else {
        // zero index to prevent trigger click event again after submission
        self.closest('form')[0].submit();
    }
});