update auth redirect code