Login/out in the core