Example of using an authentication service with angularjs