Refactor classes with low Code Climate grades

I refactored some classes that got a low grade on the “Classes by Rating” chart at [Code Climate – Authlogic](https://codeclimate.com/github/binarylogic/authlogic). I improved the `Password` class with an F grade and two of the classes with C grades. I also fixed a typo that I noticed in a test.

When I tried running the tests, the test suite had tons of failures even before I changed anything. So to make sure the code still works, I only read it over multiple times looking for problems.