Changed redirect in the requireRank function from index.php to agenda.php and added a call to the requireRank function in approve_users.php