define(['jquery', 'app', 'services/User'], function ($, app) {
  var services = [
    { name: 'Facebook' },
    { name: 'Github' },
    { name: 'Google' }
  ];

  return app.controller('SignInController', ['$scope', '$window', 'userService', function (scope, win, User) {
    scope.services = services;
    scope.userAvatar = User.getUserHash() || '';

    scope.signInWithStrategy = function () {
      win.location = '/auth/' + this.service.name.toLowerCase();
    };

    scope.signedIn = function () {
      return User.signedIn();
    };

    scope.signOut = function () {
      return User.signOut();
    };

    scope.toggleTOS = function () {
      scope.tosExpanded = !scope.tosExpanded;
    };

    $('#signIn')
      .on('opened', function () {
        $(this).find('button')[0].focus();
      })
      .on('closed', function () {
        $('[data-dropdown="signIn"]').focus();
      });
  }]);
});

@@ -239,34 +239,108 @@
 e', 
-function (scope, win, User
+'historyService', 'settingsService',%0A    function (scope, win, User, historyService, settingsService
 ) %7B%0A
@@ -672,16 +672,113 @@
 ignOut()
+.then(function () %7B%0A        historyService.destroy();%0A        settingsService.destroy();%0A      %7D)
 ;%0A    %7D;

Clear local storage on log out