For Judgment was false, one question is this user already created and has role? Did you try printing
and check what is the role user is in? I guess the role is being checked before the role is actually applied. Please cross check once.
And for Html part, Did you try to set encode to false when you end if statement? Something like this:
{% if (CurrentUser.IsInRole("SampleRole")=="True") {%}
<p>
IsInRole
</p>
{% }else{ %}
<p>
NotIsInRole
</p>
{%}|(encode)false|(identity)GlobalAdministrator%}