Refactor. Persist chat and username