added a success and failure callback on submitting an event to firebase