How to proper authenticate an AngularJS client to the server How to proper authenticate an AngularJS client to the server angularjs angularjs