added propper redirect flow