code: function(options) {
        var storedUser = ((!this.isOAuth2Mode() && this.Storage.retrieve(this.loggedInUserKey)) || this.Storage.retrieve('oauth2.user'));
        //The logged in user's ID is saved in local storage until removed, so we need to check to make sure that the user has valid login credentials before returning the login ID.
        if ( options && options['success'] ){
          this.hasValidOAuth(options);
        } else {
          return (this.isLoggedIn(options) && storedUser) ? storedUser : null;
        }
      }
docs: Returns the current logged in user's login id: username (or your custom field if specified in StackMob.init), email, or whatever is defined as the primary key.
  Optionally accepts asynchronous callback methods in the options object.