Added more flexibility for login redirect
Resolved merge conflict