fixed func validation, cookie validation