This is the home page so to be able to login only once and access the secured pages it needs to check on the page load for if they just refresh or renav to the home page after they already logged in. Now if they havent logged in at all then the pageload will not have a txtUserName content to load into the session var. It needs to ignore the "Enter UserName" auto text htat I had populated in the js in the html for the page as shown by Shuja Alis posted code.

So it seems that when the postback happens it doesnt pickup the session var.