CCleaner is a great tools and very powerful when it comes to cleaning up lots and lots of stuff that bloats your device, but with all that power comes a great responsibility to manage exactly what it is clearing out, if not it will, and does, clear out everything.
However, all is not lost, you can train it, tell it, however you want to say it, to only clear the stuff you really want gone.
Here is their advice on how to deal with cookies and browser data, sometimes it is not the cookies that are the problem but that CCleaner also clears you browser history so that any sites you previously visited aren't remembered.
Clearing Cookies and Browser Data, or Not.
The problem of loosing login details when you clear cookies can be solved by maintaining a password vault which means you don't need to rely of cookies for all those needed login details.