Debug login bug - crash on failure
Update api to allow generalized endpoints