To exit the game correctly use the File > Logout menu to log out of your current character.
If you do not use File > Logout but simply close the game window your character will be visible in the game for 15minutes before it is automatically logged out.
Then use the Logout link on the Account screen (if it is still open) to log out of your account.