The first {% endif %}
ends the first block. You then have if User_No_Auth_Tld > 0
and you close that block too. By the time {% else %}
comes up, you're no longer within an if
block so it's an unexpected tag.
If you remove the first {% endif %}
it will work