Flask web application, with handling for user login status
Despite html code indeed looks nice, is there where you want to point out your efforts

Jinja supplies conditional blocks (like in python) where you can define which buttons you want to appear on screen, depending if user is logged in or not

This is a bare example

&lt;div&gt;
        {%+ if something %}yay{% endif %}
&lt;/div&gt;


Following your example, your condition for user authentication can go in the template directly

{% if current_user.is_authenticated %}
  Hi {{ current_user.name }}!
{% endif %}


Feel free to read a bit more about options on templates on the following link for Jinja documentation

http://jinja.pocoo.org/docs/2.10/templates/

Enjoy the coding :)