Forbid empty messages.
Fire socket disconnect at logout. xhr-polling does not disconnect on session end.
Remove unused.