Couple Suggestions. Not sure if they will work or be of any help. You tried clearing the cache too right?
Also, quick question, but what did you mean when you said the following? If you disable two-factor auth, does it allow you to login/register as usual?
Option 1.
ACP > System > Support > Error Logs.
This might give you some insight depending on whether or not it's logging your problem.
Option 2.
Disallow new registrations and only use Steam, Discord, etc. It will make new accounts for folks who don't already have one, it's a great route to go if you want to prevent spam, and it's quicker. My buddy who runs IPB for a Gmod community only offers login via Steam and it is working like a charm.
Option 3.
Go to whateveryoursiteis.com/admin/upgrade and login, then proceed through the updater, even if no updates are available. On the second or third screen, it will check the permissions on your site and tell you if you have any PHP issues. If you do, correct them and try your login handler again.
Option 4.
Last resort, backup your database, start with a new installation, then re-deploy your database. Might break something but it may fix your issue if you're having corruption problems. Chances are you're going to have to go in and fix a couple things by hand if you go this route, but I suppose it just depends on how bad you want the default login handler to work.
Let me know if you have any luck