Factor out pass.php from index.php