Unlikely infinite recusion fix in authenticiation

Fixed very very very unlikely infinite recursion loop in token generation. $test++ would mean test gets incremented afterwards, so it just keeps passing 1 back into the recursive function. ++$test increments, then passes it in.