Check unique username whilst adding users and ensure unique index in the database