added an event handler; background now turns red on login failure; count the
number of failed login attempts and display