This is User Content example. just use this shortcode and show a restricted content for guest user, it will automatically show this content after login.
Note: you can use this shortcode in article and custom module. for your help we give an example bellow
[user_content]Content for logged User Content[/user_content]