iCloud keeps signing in after I sign out
Rather than fuss with each of the settings within iCloud, you might want to delete the entire account using System Preferences:


Open Mail, Contacts &amp; Calendars and delete all iCloud accounts.
Open iCloud Preference Pane and press Sign Out


The first step won't delete anything that's already stored in the cloud, only items on the local computer. The second step will also only delete local content and erase any of the certificates, keys and other things that tie a computer to iCloud servers. At that point, I would reboot and then check your Mac for other issues (disk utility to check the disk catalog once you boot into Recovery HD) and then decide if things are stable again.

Specifically, you might have corruption in the preference file that stores iCloud log in credentials. You can test this by making a new account on the Mac and then signing in and out of the same iCloud account.

That will isolate the error to either your iCloud account (meaning you contact Apple support to get the account cleared up) or the error is the user account on the Mac (meaning you back up the Mac and set that user up / restore the files that are not corrupted).