private void Authenticate(ref HttpSessionStateBase session, string token) { iisTraceListener.WriteLine("Authenticate"); iisTraceListener.Flush(); User user = new User(); UserAuthentication userAuthentication = new UserAuthentication(); if (userAuthentication.IsAuthenticated(ref user, token)) { session.Contents.Add("USER", user); } else { session.Contents.Remove("USER"); } }