From http://wemadeyoulook.at/en/blog/implementing-basic-http-authentication-http-requests-angular/