Possibly fix LoginWindow bug

Needs to be tested, I have never been able to recreate the issue myself.