After installing Magento locally I could not login to my Admin panel. Using the correct password it was just refreshing the login page every time.
Look for the file:
Arroud the line 100:
Add bars to comment the line:
Now you will be able to login.
Please notice you should avoid touching core files at any cost. If you ever update, you'll lose the changes.