If an error occurs joining a room, then the local history that was read in is removed from the list of chat messages, and from the HTMLDocument.  Also fixed a bug with joining a room for which there is not yet any local history.