added down and dirty js to validate session.