There was an error connecting to the Apple ID server - akd NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9807)
I've had the same problem with App Store and Icloud for some time. For me the root cause for was a security hardening tip to enforce OSCP and CRL verification. 

To see if you have the same problem start "Keychain Access" and open "Preferences". Select "Certificates" and verify that you have "Best attempt" for CRL and OCSP. After changing these values back to "Best attempt" I could login to Itunes. I had to restart to be able to login to App Store.