login redirect fix and logout redirect