fixing login redirect