Throw the correct errors for bad password, bad json, wrong content type.