Added logic for rendering the admin page