You can use either cookies or the html5 datastore to save the credentials or the base64 string with the credentials. You can then load them from there and parse them to $http.defaults.headers.common['Authorization'] = 'Basic ' + credentials;
Hope it helps.