One day when i opened the minecraft launcher all the files downloaded fine but it just was stuck on the loading versions page and was obvious it would load i even let it sit for a few hours but nothing.So i deleted the launcher files since i know they would reappear and it logged me out of the screen into the original login screen when you first ever launch minecraft and i haven't been able to login for the past few days, i enter the correct details and it loads for 1 second stops and then starts loading even though it would never finish logging me in.
Press the windows button, at the search bar type in %appdata% then click roaming
delete the file called .minecraft (or minecraft)
Then try the launcher.