Hi I have a web page, which has a login corner. When someone logs in and clicks the "Go" button, a class called Security gathers the users details and posts it back to the same page, under a session variable called "User"

VB Code:
  1. Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click
  2.         'Login into the system
  3.         Dim l As New Security()
  4.         Dim Outcome As PPPL.Security.LoginOutcome
  5.  
  6.         Outcome = l.DoLogin(Login.Text, Password.Text)
  7.         Select Case Outcome
  8.             Case Security.LoginOutcome.lgBADLOGIN
  9.             Case Security.LoginOutcome.lgBADPASSWORD
  10.             Case Security.LoginOutcome.lgINACTIVE
  11.             Case Security.LoginOutcome.lgLOCKED
  12.             Case Security.LoginOutcome.lgLOGGEDIN
  13.                 Session("User") = l
  14.                 If l.IsAdmin Then
  15.                     EnableFixtureEntry(True)
  16.                 Else
  17.                     EnableFixtureEntry(False)
  18.                 End If
  19.                 Label3.Text = "You are logged in as " & l.User
  20.         End Select
  21.  
  22.     End Sub


When the page postsback to itself, I need that session variable saved, so that I can access it. Trouble is when I try to retrieve it, I get a null value.

VB Code:
  1. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         'Put user code to initialize the page here
  3.  
  4.         If IsPostBack Then
  5.             'Determine if the user is logged in.
  6.             Dim l As New Security()
  7.             l = Session("User")
  8.  
  9.             If Not l Is Nothing Then
  10.                 pnlPredictions.Controls.Add(New LiteralControl(l.User))
  11.             End If
  12.         End If
  13.  
  14.     End Sub

Problem is that when it gets to evaluating whether l Is Nothing, it always returns true. Please can someone help me?