wire up alert and modal for api calls