{{template "header" .}}

    <form class="form-signin" action="{{.URLPrefix}}/login" method="post">
      {{.CSRFField}}

      <h1 class="form-signin-heading">Sign In</h1>

      {{if .Error}}
      <p class="error">
        Authentication failed.
      </p>
      {{end}}

      <label for="inputUsername" class="sr-only">
        Username
      </label>
      <input type="text" name="username" id="inputUsername"
             class="form-control"
             {{if .AuthError}}
             value="{{.Username}}"
             {{else}}
             placeholder="Username"
             {{end}} required autofocus>

      <label for="inputPassword" class="sr-only">
        Password
      </label>
      <input type="password" name="password" id="inputPassword"
             class="form-control" placeholder="Password" required>

      {{if .AccountRecoveryURL}}
      <p>
        <small>
          <a href="{{.AccountRecoveryURL}}">
            Forgot your password?
          </a>
        </small>
      </p>
      {{end}}

      <button type="submit" class="btn btn-lg btn-primary btn-block">Login</button>

    </form>

{{template "footer" .}}