tests for password length and authenticate method