validateSession() never returns any value, and fix a flawed conditional.