Improve logic for deciding the default account
First, we now set the default account setting to the group name, so it can work for accounts that have the same username but different instances. We want to be able to check the old version without the instance uri as well.