Change redirect_if to decorate functions, not app methods.