finished supporting switching between accounts