fixed login redirect problem