modified login redirect, added login event