base64_encode missing in isCsrfTokenValid method