Adjust Selenium script to allow for asynchronous logout.