validating input password; added tests
Cleanup.