xcode communication with apple failed
I just updated xcode to 9.4.1 (9F2000). Now when I go into accounts for my apple id it shows 'Communication with Apple failed'. When I try to sign in again I get the message 'The operation couldn't be completed. Unable to log in with account' and 'An unexpected failure occurred while logging in (Underlying error code 0).'
I know my password is correct and my apple id is correct and my mac connects to the network fine (note above that I installed an update to xcode).
Anybody have any idea on how to resolve this? Google is keeping me busy but not providing any information on how to resolve the problem.
On deleting the applied from xcode and reentering it I get the error:
Communcation with Apple failed
A non-HTTP 200 response was received (403) for URL https://developerservices2.apple.com/services/{code}/viewDeveloper.action?clientId={anotherCode}
MacBook Pro (15-inch, 2017), iOS 11.4, null