added check for duplicate user names