Added a 3 try lockout mechanism.