fixed check_role and reformatted index.php