add global chat & remove some security flaws