Split the contents of index.php into many files.
New user and permissions libraries.