Try:
public bool CheckAuthentication()
{
System.Security.Principal.IPrincipal currUser;
bool isCurrentUserAuthenticated = false;
currUser = System.Web.HttpContext.Current.User;
if (currUser.Identity.IsAuthenticated)
{
isCurrentUserAuthenticated = true;
}
else
{
}
return isCurrentUserAuthenticated ;
}