Altered ValidateSession Function

Altered the static function ValidateSession so that the redirect works
properly when called from anywhere (within the core or in modules)