Users are logged out when viewing nodes
I finally found the reason for this weird problem: my comments' template contained a misplaced global $user;. I don't know why this causes trouble, but at least it's fixed now. Hopefully, this can get people with a similar problem on the right track to find a solution.