Changes for logging events and username length issue