SIGN IN SIGN UP

add failed authentication attempt logger

When `isAuthed()` is called and the password cookie is not what we
expected, the failed login attempt is logged with the provided password,
remote address and user agent.

To allow for logging failed attempts with a reverse proxy, the
`--trust-proxy` argument has been added to trust the `X-Forwarded-For`
header. This implementation of an `X-Forwarded-For` parser uses the last
value in the list, therefore only trusting the nearest proxy.
D
Dean Sheather committed
a65773338c2bf140a4731a0ac10ac80694b6a831
Parent: 242bb6f