{% extends "authease/base.html" %}

{% block title %}Log In{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6 col-lg-5">
        <h2 class="mb-4">Log In</h2>
        <form method="post">
            {% csrf_token %}
            {% if request.GET.next %}
            <input type="hidden" name="next" value="{{ request.GET.next }}">
            {% endif %}
            <div class="mb-3">
                <label for="email" class="form-label">Email address</label>
                <input type="email" class="form-control" id="email" name="email"
                       value="{{ email|default:'' }}" required autofocus>
            </div>
            <div class="mb-3">
                <label for="password" class="form-label">Password</label>
                <input type="password" class="form-control" id="password" name="password"
                       minlength="8" required>
            </div>
            <button type="submit" class="btn btn-primary w-100">Log in</button>
        </form>
        <p class="mt-3 text-center">
            <a href="{% url 'authease-password-reset' %}">Forgot password?</a>
        </p>
        <p class="text-center">
            Don't have an account? <a href="{% url 'authease-register' %}">Register</a>
        </p>
    </div>
</div>
{% endblock %}
