Added switchButton call to onAfterAction for UserController.