You can log back in unless the spot where you logged out had been blocked. If that is the case, you're forced to spawn in the wilderness and seem to get a new hearthfire too.
IMPORTANT: Devs have taken action to discourage abusing this system. You will start to receive "Hearth Burn" wound if wilderness spawn too much. I'm not sure how it works but I assume the first couple of times you get no wound at all and then you get increasing wounds.