define([], function () {
  return {
    hasLoggedInUser: function() {
        return !!this.profile.get('username');
    },
    profile: null
  }
});

define([], function () {
  return {
    hasLoggedInUser: function() {
        return !!(this.profile && this.profile.get('username'));
    },
    profile: null
  }
});

Change boolean check to utilize shortciruit
Change boolean check to utilize shortciruit
