I am damn sure that somewhere your session is getting cleared. You need to go through the coding and find the place where it is getting cleared. If your session is coming null then somewhere in code only you are making it null and you forgot about that. If your session is coming empty then check for the value you are assigning to the session. Try this:
if(userInfo.UserName != string.empty)
{
Session["LoginID"]=userInfo.UserName;
}
else{
}
--Amit