The login window is shown briefly after reloading even when a user is already logged in. On macOS this results in the Touch Bar switching to Touch ID mode and a password autofill window popping up for that split second.
I would suggest only rendering LoginForm after the /api/me request.