Frontend uses HTTP error codes
Closes #145, closes #150