Adding counter for failed login attempts

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

Fixes #182
Merge pull request #183 from TheSerapher/issue-182

Adding counter for failed login attempts