Somewhat working version to limit login attempts to 4.  Needs refactoring