better error reporting in session validation