How about adding a column ("lock") and use a binary True/False (1/0) to allow them to log-in. Then, just check the form username, with that in the database and if the use has a "1" in the lock column, then they can't log in.
Also, add a function to send an email to the registered user that says their account has been locked because of 3 invalid login attempts. Then, link them to a hidden page that allows them to "re-register" with all their info. Check that against what's in the database, and unlock/re-password it, or log the IP and ban.
That's just my 2 cents.
~Brett