moved methods createToken(), checkToken(), _generate_salt() from tokens.php; not that checkToken() always returns true at this moment!