DRY up the redirect flow a little bit.