I changed my base URL from a local IP address to a hostname. Magento loads everything fine but when I attempt to login to the admin section the page refreshes without an error. If I type in the wrong password then the page refreshes and displays invalid credentials message.
It looks like this is the classic cookie error. Remove all the cookies from the previous domain or try to login with another browser/incognito mode. Also remember to change the cookie path in your DB. Check this link to achieve that.
I've been pulling my hair on this one a bunch of times for different reasons (Admin login loop after changing BASE URL / SECURE URL settings)
This allows me to log in everytime, fix whatever I did wrong, clear all cache, sessions, etc & undo the changes:
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php and comment out those 3 lines (in 1.7 it's from line 89 to 91)
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath() // 'domain' => $cookie->getConfigDomain(), // 'secure' => $cookie->isSecure(), // 'httponly' => $cookie->getHttponly() );