Added login / logout functionality