set up pages controller and routes