checking the session of each pages