login / logout workflow improved