Added chat logout handler.
Fixed incorrect user selecting.
Added onerror event notification.