<div class="row">
    <div class="col-md-12">
        <h1><span class="glyphicon glyphicon-user" aria-hidden="true"></span> Log in <small>(Autoconfig with <a href="https://www.mozilla.org/thunderbird/" target="_blank">thunderbird</a>)</small></h1>
    </div>
</div>

<div class="row">
    <div class="col-md-6">

        <form method="post" action="/account/login">
            <input type="hidden" name="_csrf" value="{{csrfToken}}">

            <fieldset>

                <div class="form-group{{#if errors.username}} has-error{{/if}}">
                    <label class="control-label" for="username">Username</label>
                    <div class="input-group">
                        <input type="text" class="form-control lowercase" name="username" id="username" placeholder="username" value="{{values.username}}" pattern="^[A-Za-z0-9][A-Za-z\-\.0-9]*[A-Za-z0-9]$" required title="Valid email address user">
                        <span class="input-group-addon">@{{serviceDomain}}</span>
                    </div>
                    {{#if errors.username}}
                        <span class="help-block">{{errors.username}}{{#if errors.username_action}} –  <a href="{{errors.username_action.target}}">{{errors.username_action.title}}</a>{{/if}}</span>
                    {{/if}}
                </div>

                <div class="form-group{{#if errors.password}} has-error{{/if}}">
                    <label for="password">Password</label>
                    <input type="password" class="form-control" name="password" id="password" placeholder="v3rys3cret" required>
                    {{#if errors.password}}
                        <span class="help-block">{{errors.password}}</span>
                    {{/if}}
                </div>

                <div class="form-group">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" name="remember"> Remember me
                        </label>
                    </div>
                </div>

            </fieldset>

            <div class="form-group">
                <button type="submit" class="btn btn-success">Log in</button>
            </div>

        </form>

    </div>
</div>

