Fix for password resets not clearing the bad login count

Who would have thought that adding a test to increase the test coverage by a single line would lead to a bug fix :)

This patch depends on #37.
Good point. I've opened #40 for this.