Setting up CORS filter and authentication 401 BasicAuth stuff.
now correctly queues and then resubmits http after login

... updating the HTTP headers with the new 'Basic xxx' header.

Also, putting the username onto the $scope.