session bug fix in functions.php