Add cookie and js for chat