$. bower install
Inject in your project 'cr.user' then you can edit the settings with the $crUserProvider.
//then add base 64 auth handler to cr-user
$crUserProvider.setAuthHandler($crAuthBasic);
The example above will add the Basic Auth layer. Other settings will be available.