Added a separate API path constant because of bug in  that ignores escaped port numbers
Refactor AuthService promises for better error handling