Fix button colours after success and failure

Cherry-picked commits from #11 after @zoidbergwill merged #12 .

* This corrects the behaviour of the buttons, turning on the last pressed button green on success and all buttons red on failure. 
* A error 500 handler was added and causes the buttons to turn red, 404s are ignored. 
* Switch to using tuples for the OrderedDict of buttons so it stays in order