Facia tool: detect auth state in ajax

...and redirect to login when not auth'd. Includes tidy up to remove reqwest and use promises rather than callbacks. (Sorry, big PR.)