I had fixed the above issue by following these steps.
1- Go to file app/code/core/Mage/Core/Model/session/abstract/varien.php
2- Go to line number 95 and comment out the cookieParams array and define $cookieParams as an array like below
// session cookie params
/*$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);*/
$cookieParams = array();
This will allow you to log in.
3- Then go to admin panel check configuration, System->Configuration->web->session & cookie management in that the HTTP control set from Yes to No. Clear or set the proper path.
Hope this answer will help you.