Added event before_redirect