ウェブサイトでユーザーがログインしていることを検出する

I want to login in my website, also stay logged in discourse.
I need help with this problem.

「いいね!」 1