I know this is an old post, but maybe still helpful to someone else.
Code:
{if $login eq "" }
YOU MUST BE LOGGED TO VIEW THE PRODUCTS.
{/if}
or if you want to display a message after they have logged:
Code:
{if $login eq "" }
YOU MUST BE LOGGED TO VIEW THE PRODUCTS.
{else}
You are logged in!
{/if}