---
title: Sign in
listed: false
published: true
handle: sign_in
---
{% extends 'index' %}

{% block content %}

<h1>Sign in</h1>

{% if current_account %}
  <div class="alert alert-warning">
    You're already authenticated!
  </div>
{% else %}

  <form action="{% path_to 'sign_in' %}" method="POST">
    <input type="hidden" name="auth" value="sign_in" />
    <input type="hidden" name="auth_content_type" value="accounts" />
    <input type="hidden" name="auth_id_field" value="email" />
    <input type="hidden" name="auth_password_field" value="password" />

    {% if auth_signed_out %}
      <div class="alert alert-info">
        {{ auth_signed_out | translate }}
      </div>
    {% endif %}

    {% if auth_wrong_credentials %}
      <div class="alert alert-warning">
        {{ auth_wrong_credentials | translate }}
      </div>
    {% endif %}

    <div class="form-group">
      <label for="auth-email">Your E-mail</label>
      <input type="email" name="auth_id" class="form-control" id="auth-email" placeholder="Email">
    </div>
    <div class="form-group">
      <label for="auth-password">Password</label>
      <input type="password" name="auth_password" class="form-control" id="auth-password" placeholder="Password">
    </div>
    <button type="submit" class="btn btn-default">Sign in</button>
  </form>
{% endif %}

{% endblock %}
