Updated login script
fixed merge conflict and fixed login redirect to profile