Add logout functionality to client