Terminating the shell (i.e., Explorer or something else) doesn't log you out. Your login session over RDP is more than just your shell. Try this command in a Command Prompt window on the machine you want to logout from (i.e., the machine you have RDP'ed into):
C:\windows\system32\shutdown.exe /L
It should log you out without shutting down the machine.