HTTP: improve the error callbacks
SPA: implement reauth-needed.
Frontend tests: include a missing file
Add tests for reauth-needed.
Fix jshint error