Page navigation functionality through main.js