Your issue is most likely a misconfiguration of DiscourseConnect. Please start from the beginning again and make sure you follow this guide closely. The details you’ve given a bit vague to give you more specific advice than that at this stage.
If you’re still having issues after following that guide closely please ask a question in that topic.
This is happening because by clearing your cookies you are effectively logging yourself out.