fix login / logout