Create a new WebDriverWait like so:
WebDriverWait customWait = new WebDriverWait(driver,TimeSpan.FromMinutes(5));
and do
customWait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.XPath(".//*[@id='logOnContainer']/form/div[1]/button")));
when you initialized your wait at some point in your code, you probably set the timeout at 40 seconds.
The reason you have your problem, is because 40 seconds pass and your elements are still not visible. After they are all visible, program stop "waiting" and will continue with the rest of the code.
If you will, you can set your own timeout by changing the TimeSpan I gave in my example.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…