{# templates/login/index.html.twig #}
{% extends 'base.html.twig' %}

{# ... #}

{% block body %}
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}

<form action="{{ path('app_login') }}" method="post">
    <label for="username">Email:</label>
    <input type="text" id="username" name="_username" value="{{ last_username }}" required>

    <label for="password">Password:</label>
    <input type="password" id="password" name="_password" required>

    {# If you want to control the URL the user is redirected to on success
        <input type="hidden" name="_target_path" value="/account"> #}
    <div class="d-flex justify-content-end">
        <button type="submit">Connecter</button>
    </div>
</form>
{% endblock %}