It's not possible to check if a user is signed in with $is_signed_in variable in portlet.vm.
Create custom a portlet.vm with a #if($is_signed_in) statement.
Select the theme and check if the if statement works as expected.
We have a "favorite this portlet" button in each portlet header which is only visible for all logged in users (So not guests). The most straight forward way to show/hide this button is using the $is_signed_in check.
We've now implemented it with a CSS workaround which isn't optimal.