Added javascript redirect after successful registration