Bug 998523 - updateUI after logout, r=markh
Bug 1006379 - don't attempt language detection if the document is gone, r=felipe