Modified the way failed login attempts are handled