Fix issue where sometimes the logout=logout wasn't being added to URL correctly.