Basic classes for session management in AngularJS