Handling Web Application Authentication with AngularJS