Fix for failed registration being redirected to login page, not registration page