Fix for redirection, and add flash notifications