added options for custom token validation