code: function isAuthenticated() {
    var storageEngine = App.pkg.settings.storage_engine || 'localStorage';
    var name = App.pkg._id;
    var auth = window[App.pkg.settings.auth_module];
    if (window[storageEngine][name + '-session']) {
      var data = JSON.parse(window[storageEngine][name + '-session']);
      data['empty'] = false;
      window.user = new auth.models.User(data);
    } else {
      window.user = new auth.models.User();
    }
    return !window.user.get('empty');
  }
docs: Authentication validation