After troubleshooting long login for a server 2019 that was not internet connected, but domain joined, I found that the machine had been Azure Hyrid joined before it had been moved to the isolated vlan that does not have internet access, this was causing 8 minute login times. The solution was removing the machine from Azure AD Joined status using the following two commands:
Verify:
dsregcmd.exe /status
Leave:
dsregcmd.exe /leave
After the long removal process (It's probably timing out trying to contact Microsoft Azure AD / Microsoft Entra) the machine logs in and logs out almost immediately. For those chasing long login times, I hope this helps,
-John.