Reduce the number of console errors thrown out by the tests.

* Add the missing helper functions that can be seen in the Firefox dev tools as ReferenceErrors
* Fix the MIN_PASSWORD_LENGTH/MAX_PASSWORD_LENGTH constants to PASSWORD_MIN_LENGTH/PASSWORD_MAX_LENGTH