Core functionality for password-based account lockouts.