Apple ID server connection error on iPhone 5
Hi. I have been having this problem for twice in the last 15 days: On my iphone5 (with IOS 10.2.1), I suddenly see a message requesting me to sign in to my Apple ID. I enter the email and password correctly and then it says there is a problem connecting to apple id server. I can reach my icloud account in my laptop. (With Windows 10) Last time, I had solved the problem by hard resetting my phone. But this time, it does not help. I am temporarily in another country and since yesterday, I have been using a new SIM here. But everything was working yersterday with the new SIM. At the moment, because of this problem, my phone can not connect to wifi anymore. (It seems connected but it is not, in fact.) All my email inboxes are empty on my phone now. I can not use other applications, as well.
I don't want to reset everything. Is there a solution for this unbelievable problem? And what is the cause of it? So that I can prevent it from happening in the future.