Simple AngularJS app interacting with an authentication API