enable redirect controller only in pre-registration
moved errors middleware to a individual controller