With few details, such as language, authentication proivders, etc... ill assume its the standard ASP.NET/C# stance :)
This could be achieved by checking if the user is authenicated and if they are, change the text and url of the control.
Using ASP.NET Users/Roles, this can be done by:
if(HttpContext.Current.User.Identity.IsAuthenticated)
{
}
else
{
}
-DB