proper logout error handling (bug 797930)