Logout button doesn't rendered
I have implemented user auth using kinde successfully and my ecommerce website is able to login and logout. But, after hosting to github and when I login to my account, I am redirected to the homepage but the login button is still there which is suppose to be the logout button(I look at the console and it says 'Invalid State'). But, when I click the login button again then the logout button is rendered. Pls help me solve this, I can send my code if you want.