added in exit button and it's functionality
added in exit button and it's functionality