fixed login redirect issue