You can log out anywhere in the lands of Britannia. You don't have to go to an inn to log out. There is a time delay to logging out. If you are near hostiles your character will stay in the game for 60 seconds after you log out. If there are no hostiles present, you will stay in the game for 30 seconds after you log out. You cannot log out and immediately come back and log in a different character. It has been observed that if you try to log in a different character right away that the client will crash. So give it a good minute before trying to log in another character.