Added an exit function

I've added an exit function to the client. It's well needed and kind of expected for an CLI.