{%- if config.ACCOUNTS %}

    {%- if not current_user.is_authenticated %}

        {%- if config.SECURITY_REGISTERABLE and registration_enabled %}
            <div class="short-menu-right-button">
                <a href="{{ url_for('security.register') }}" class="no-decoration">
                    {{ _ ("Sign up") }}
                </a>
            </div>
        {%- endif %}

        <div class="short-menu-right-button">
            <a href="{{ url_for_security('login', next=request.path) }}" class="no-decoration">
                {{ _("Log in") }}
            </a>
        </div>
    {%- else %}
        {%- if config.USERPROFILES %}
            <div class="short-menu-right-button">
                <a href="{{ url_for('invenio_userprofiles.profile') }}" class="no-decoration">
                    <i class="user icon"></i> {{ current_user.email }}
                </a>
            </div>
            {%- for item in current_menu.submenu('profile-admin').children if item.visible %}
            <div class="short-menu-right-button">
                <a class="dropdown-item no-decoration" href="{{ item.url }}">
                    {{ item.text|safe }}
                </a>
            </div>
            {%- endfor %}
            <div class="short-menu-right-button">
                <a class="dropdown-item no-decoration" href="{{ url_for_security('logout') }}"
                    >{{ _("Sign out") }}</a
                >
            </div>
        {%- endif %}
    {%- endif %}
{%- endif %}
