de >= 400){
          alert(data.error);
        }
        else {
          //Send toast notification
          createToast('MFA has been disabled', 'multifactor authentication')
        }
        checkMFAStatus()
        //Sync type
        setTimeout(() => { reloadPageContent(); }, 1000);
      });
    }

    // Check minimum length for OTP
    function checkOTPLength(){
      otp = $('#oneTimePassword').val();
      if (otp.length >= 6) {
        console.log('MFA enable button enabled')
        $('#enabl