Older sites, aging infrastructure, poorly designed workflows, or those that rely on synchronous web requests to complete might take a long time to respond, regardless of login success.
Your automated login should not be too sensitive to these delays, and should introduce a wait-state or timeout that aligns with what you'd expect.