Fixed logout issue where openDir() returns a JSON string and not the login page.
Fixed logout issue where openDir() returns a JSON string and not the login page.