Add API for login / logout