Refactor chat HTML, JS & show unread message count for pm/server also.