logger & router middleware