By default all applications and windows of the current session are reopened upon logging out and logging back in again. This feature can be turned off globally by

defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false

in Terminal.