Fixes #5594 - Failed registration automatically reopens register form on walled garden login page

Did everything in JS as it's simplest way here. JS code does more than just displaying view fetched via AJAX, we'd have to duplicate it in PHP to avoid AJAX call after redirect.

We might redirect to /register when in walled garden instead (hook on forward in register action?).