If you pull down a Magento site to a local machine, and change the database core_config table to point to the local machine, and it appears to work fine until you try to login to the site admin, there can be many issues.
One of the most common ones though is not having a period (dot) in the host name – e.g. localhost/admin or martyn-desktop/admin – if you don’t have the period, the cookies don’t work properly and you end up in a login loop.
To fix it, make sure your machine is accessible via a domain with a period – e.g. martyn-desktop.local – by either editing your hosts file (/etc/hosts) or check your router – it possibly already adds a domain name like .config and set your path in core_config to the same.