Fixed double login window bug