Popups for success and failure

Adds trigger actions for displaying popups on success and failure, and corresponding messages specific to the situation. How does it look? @kadst43 @BrettASwift 
`displayFailurePopup` and `displaySuccessPopup` are mostly repeated code. You can use a state parameter ("failure" or "success") to determine what text to write to the popup and which function to attach to the onclick in order to consolidate them into a single `createPopup` function. Should we find the need to add more states, this would make it easier.