89118

Question:
It looks like JavaScript does not have access to authentication cookies ('ASP.NET_SessionId', '.ASPXFORMSAUTH')
in the http headers I can see cookies but document.cookie object does not have them.
Answer1:ASP.NET session cookies are <a href="http://en.wikipedia.org/wiki/HTTP_cookie#HttpOnly_cookie" rel="nofollow">HTTP-only</a> by default (and rightfully so). If you need to find out if the user is authenticated in Javascript, putting a HiddenField on the page and setting its value to 0 or 1 based on your authentication token is a much better solution.
Answer2:You could create a WebMethod which uses the following code to return a true/false value:
[WebMethod]
public bool IsAuthenticated()
{
return HttpRequest.IsAuthenticated;
}
Call this from javascript using jQuery or MSAJAX.