Adding the following snippet will let you check if the user is signed in or not in your WordPress website.

Snippet Source/Credit: WordPress Codex