refactored logic to populate the $_POST with register data after the
redirect