Redoing the session logic