Rule 1 - Always login to https://account.smartthings.com to get to the IDE. It will redirect you to the correct shard.
Rule 2 - Please refer to Rule 1.
And basically you’re right - the device handlers need to be in the correct location to be accessed by your devices. Login to account.smartthings.com as noted above, then go to location, pick the right one, THEN start importing device handler and smartapp code.