Move bodyParser and redirect into middleware