Fixing login redirect