AngularJS controllers should only mange the $scope object and 'auth-login-success', loginFailed: 'auth-login-failed', logoutSuccess: 'auth-logout-success', .