fixing password redirect flow