        }
        
      });
    }

    // Enable OTP for the user
    function enableMFA(){
      console.log("Info: enabling MFA");
      id = "{{ page_user_id }}"
      otp = $('#oneTimePassword').val();
      action = 'enable_mfa';
      $.post("{{ url_for('api') }}/users/update_user", { id: id, action: action, otp: otp }, function (data) {
        console.log(data);
        if (data.error_code >= 400){
          alert(data.error);
        }
        else {
          //Send toast notification
          c