js modules for chat and chat server