added method to handle close menu item being clicked

as well as defined the controller class being used by the FXML file, no we can start using the components from the u.fxml file.