Adding counter for failed login attempts

* Track failed login attempts of a user
* Reset failed attempts as soon as the login succeeded

Fixes #182