<commit_before>(function() {
  'use strict';
  angular.module('civic.security.login.toolbar', [])
    .directive('loginToolbar', loginToolbar);

  // @ngInject
  function loginToolbar(Security) {

    var directive = {
      templateUrl: 'components/directives/loginToolbar.tpl.html',
      restrict: 'E',
      replace: true,
      scope: true,
      link: /* @ngInject */ function($scope) {
        $scope.isAuthenticated = Security.isAuthenticated;
        $scope.login = Security.showLogin;
        $scope.logout = Security.logout;
        $scope.$watch(function() {
          return Security.currentUser;
        }, function(currentUser) {
          $scope.currentUser = currentUser;
        });
        $scope.status = {
          isopen: false
        };

        $scope.toggleDropdown = function($event) {
          $event.preventDefault();
          $event.stopPropagation();
          $scope.status.isopen = !$scope.status.isopen;
        };
      },
      controller: /* @ngInject */ function($scope, $location) {
        $scope.$on('$routeChangeSuccess', function() {
          $log.info('CurrentUrl: ' + $location.url());
          $scope.currentUrl = $location.url();
        });
      }
    };
    return directive;
  }
})();<commit_msg>sign-out button now keeps user on current page instead of redirecting to home<commit_after>(function() {
  'use strict';
  angular.module('civic.security.login.toolbar', [])
    .directive('loginToolbar', loginToolbar);

  // @ngInject
  function loginToolbar(Security) {

    var directive = {
      templateUrl: 'components/directives/loginToolbar.tpl.html',
      restrict: 'E',
      replace: true,
      scope: true,
      link: /* @ngInject */ function($scope) {
        $scope.isAuthenticated = Security.isAuthenticated;
        $scope.login = Security.showLogin;
        $scope.logout = Security.logout;
        $scope.$watch(function() {
          return Security.currentUser;
        }, function(currentUser) {
          $scope.currentUser = currentUser;
        });
        $scope.status = {
          isopen: false
        };

        $scope.toggleDropdown = function($event) {
          $event.preventDefault();
          $event.stopPropagation();
          $scope.status.isopen = !$scope.status.isopen;
        };
      },
      controller: /* @ngInject */ function($scope, $rootScope, $location) {
        $rootScope.$on('$stateChangeSuccess', function() {
          $scope.currentUrl = $location.url();
        });
      }
    };
    return directive;
  }
})();
{'fraction_non_alphanumeric': 0.14788453934361406, 'fraction_numerical': 0.0, 'mean_word_length': 2.324572930354796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3508091', 'n_tokens_mistral': 726, 'n_tokens_neox': 737, 'n_words': 121}