One clean implementation of this is to wipe everything on the 2nd password failure.