I followed the following procedure and it worked for me:
1. Disable any VPN Connection (Network & Internet>find a setting> VPN (turn off both)
2.Go to Settings > Network & Internet > Status > Wi-fi > IP settings > select automatic DHCP
3. Go to Advanced Network Settings > Change adapter options > wi-fi > properties > Internet Protocol Version 4 > properties. There, make sure you have 'Obtain an IP address automatically' and 'Obtain DNS server address automatically' both selected.
4. Type cmd in the start menu, then right-click on it and choose Run as administrator to open an elevated Command Prompt window.
To reset some of the files Windows keeps to access the internet, use these two commands:
netsh winsock reset
netsh int ip reset
If that doesn't work, try releasing your computer's IP address and obtaining a fresh one from the router with these two commands, one at a time:
ipconfig /release
ipconfig /renew
Finally, refresh your computer's DNS settings with this command:
ipconfig /flushdns
5.Disable Antivirus/Firewall for 5 minutes and try logging in now.
You are good to go.