An authentication module for AngularJS