Add tests for 718999, fix a little brittle code introduced by the committed fix.
Add tests for 718999, fix a little brittle code introduced by the committed fix.

Also fix and test for a 500 if the auth token doesn't exist in the database.
n0ano/ganttclient