Added button functionality to the quit button