{% if current_user and current_user.is_authenticated %} {% if config.THEME_TOPBAR_USER_MENU_ENABLED %} {% elif config.THEME_LOGOUT_ENDPOINT %} {% endif %} {% else %} {% if config.THEME_LOGIN_ENDPOINT %} {% endif%} {% endif %}