fixed broken login / logout