fix bug when joining chat after registration