Work on oauth redirect logic