added validation logic to prevent adding of duplicate usernames