Updated chatting logic to make use of username.