// The list of identities (profiles in Mojang terms) corresponds to whether the account
// owns the game, so we need to check that
if (identities.size() > 0) {
// Set offline enabled flag to true
Configuration config = launcher.getConfig();
if (!config.isOfflineEnabled()) {
config.setOfflineEnabled(true);
Persistence.commitAndForget(config);
}
Persistence.commitAndForget(getAccounts());
return identities.get(0);