Added a way to control what happens when a successful signin occurs