better login / logout construct