Fixes redirection and registration CSRF problem