added the set timeout back in to make sure login window closes