Introduce dtor and logout()