{
  angular
    .module('meganote.users')
    .directive('userLinks', [

      'CurrentUser',
      (CurrentUser) => {

        class UserLinksController {
          user() {
            return CurrentUser.get();
          }
          signedIn() {
            return CurrentUser.signedIn();
          }
        }

        return {
          scope: {},
          controller: UserLinksController,
          controllerAs: 'vm',
          bindToController: true,
          template: `

          <div class="user-links">
            <span ng-show="vm.signedIn()">
              Signed in as {{ vm.user().name }}
            </span>
            <span ng-show="!vm.signedIn()">
              <a ui-sref="sign-up">Sign up for Meganote today!</a>
            </span>
          </div>

          `
        };
      }
    ]);
}

{
  angular
    .module('meganote.users')
    .directive('userLinks', [

      'CurrentUser',
      'AuthToken',
      (CurrentUser, AuthToken) => {

        class UserLinksController {
          user() {
            return CurrentUser.get();
          }
          signedIn() {
            return CurrentUser.signedIn();
          }
          logout() {
            CurrentUser.clear();
            AuthToken.clear();
          }
        }

        return {
          scope: {},
          controller: UserLinksController,
          controllerAs: 'vm',
          bindToController: true,
          template: `

          <div class="user-links">
            <span ng-show="vm.signedIn()">
              Signed in as {{ vm.user().name }}
              |
              <a ui-sref="sign-up" ng-click="vm.logout()">Logout</a>
            </span>
            <span ng-show="!vm.signedIn()">
              <a ui-sref="sign-up">Sign up for Meganote today!</a>
            </span>
          </div>

          `
        };
      }
    ]);
}

Add a working logout link and redirect to sign-up
Add a working logout link and redirect to sign-up
