Added the session checks.