(function () {
  'use strict';

  angular
    .module('app')
    .controller('AppController', AppController);

  AppController.$inject = ['session', 'authService', '$state'];

  function AppController(session, authService, $state) {
    var vm = this;
    vm.session = session;

    vm.logout = function () {
      authService.logout(session.sessionId).then(function () {
        $state.go('login');
      });
    };
  }
})();

@@ -156,16 +156,30 @@
 ervice',
+ '$rootScope',
  '$state
@@ -229,16 +229,28 @@
 Service,
+ $rootScope,
  $state)
@@ -324,24 +324,61 @@
 nction () %7B%0A
+      $rootScope.pageLoading = true;%0A
       authSe
@@ -441,25 +441,128 @@
    $
-state.go('login')
+rootScope.pageLoading = false;%0A        $state.go('login');%0A      %7D, function () %7B%0A        $rootScope.pageLoading = false
 ;%0A  

add pageLoading indication to logout request