Pulling connection and adding authentication into index.php