added basic login / logout function