I was struggling with this problem as well.
I had an older AdobeID which did not have CC entitlement associated with it. Therefore if LR5 was connected to CC using a different AdobeID as LR Mobile might have been signed into, then they wouldn't synchronise.
When trying to log out and login again with LR 5 it did'nt give you the opportunity to change you AdobeID.
Long story short, you need to go to creatvie.adobe.com and log in there using the preferred AdobeID. The cached logged in credential associated with this web site. This was at least how I was able to have LR 5 log in using a different AdobeIS. Hope this helps
Lightroom 5 perpetual license version which is licensed by manually inputting your 24 digit numeric license key, cannot sync with the creative cloud or Lightroom Mobile.
If you now have a Creative Cloud account that allows for the use of LR then you now have access to a second license.
This is activated differently so you will need to uninstall LR 5 using the normal uninstall process from your operating system. This will not interfere with your Catalog, Preferences or personal files but will just remove the application.
Then restart the Creative Cloud Application Manager and log into your account and it should show Lightroom available for install. Proceed.