updated app to use noir middleware