The JSON `status` attribute wasn't being parsed and that caused the rest of the process to fail. I changed it to be like the other JSON parsing (i.e. `entry` and `token`) and it now works.
-p
An $a without quotes is not putting quotes around expanded characters. The quotes around the server reload command get lost in the process.