Fix login event handler.