Improved checking for locking users out of the system