MOB-1710 implement actual switching action (logout, login) and unit tests