changed chat username, login, register and some timeout functions