I fixed the same issue just now. I ended up deleting the /Users/<username>/Library/Preferences/com.apple.com.loginwindow.plist
and that fixed it for many people according to the online forum threads, but not me.
Not until I found a little post saying to logout and uncheck the Reopen windows when logging back in
option did I fix it.
So give that a shot. BTW I'm on 10.10.5 Yosemite, but other OS versions seem affected, too.