You can only actually debug the problem if you have ruled out all conceivable sources of interference and that inevitably includes the CDN.
Even if you have solved the login problem, there are still much bigger problems that are even more difficult to solve. So I just ask you one question:
Imagine a registered user does not log out, but comes back in 30 minutes. It still has the login cookie, but in the absence of PHP for cached content, you cannot check whether the user is actually still logged in. How will you solve this?