Edit view/register.php, Reorganise JS