added activity switch when logout