add a feature to use redirect instead of popup -add a demo for this new feature

warning: I reuse the same callback url because I don't have access to the
config