I had the same issue recently. I couldn’t login into my account because the login process took more than 1 minute and the Web server Timeout was set at 1 minute.
I managed to login again after increasing the Web server Timeout. But at this time, it took 3 minutes to login in my account!
But maybe I discovered the cause. Firstly my account was the only affected.
Then, I had 90 session token in my account (caused by the app DEVONthink I tried to sync its data using WebDAV on my Nextcloud) . I deleted all those tokens (following the tip described on this post). After that, login again in my account only take a few seconds, as expected.
So it seems that is you have applications that create too many session tokens, the login process can be slowed down drastically.