Simple javascript module for chat