fixed login return data and added redirect on login