Fixes NPE when there is a server error without error set in XMPPException, normally happens on server timeout and user sees the reason "null".
Adds button in chat window to easily enable/disable chat history logging.