'Authentication timed out' on first login attempt

I have a site that always times out on the first login attempt:
‘Authentication timed out’
and succeeds on the second.
It’s not the login form by the looks of it (I have tried using a working form from another site).

Anyone come across this?
Could it be connected to using an old codebase?

I guess I answered my own question - yes, looks like it’s due to the fact that the site is using an old codebase.