How to handle user authentication and authorization in AngularJS?