changed redirect option name to redirectOnSuccess