Error with sesions

Since I’m on Cloudflare the logins are not maintained on my website. You log in with an account and it is not logged in and if it is logged in it closes by itself

How does your site determine if a user should stay logged in or not?