Fixed login event deprecation issue