abstract number of login attempts
cleaned up a few instance variable declared in functions