Few more changes
https://stackoverflow.com/questions/17959563/how-do-i-get-basic-auth-working-in-angularjs
https://gist.github.com/mikeerickson/6515021
http://wemadeyoulook.at/en/blog/implementing-basic-http-authentication-http-requests-angular/