Catches me every time
You need to create it as a unique constraint rather than a unique index.
CREATE TABLE [dbo].[usernames](
[username_id] [int] IDENTITY(0,1) NOT NULL,
[username] [nvarchar](256) NOT NULL,
PRIMARY KEY CLUSTERED
(
[username_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [IDX_usernames_username] UNIQUE NONCLUSTERED
(
[username] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
or in the index designer dialog in management studio change the index type from "index" to "Unique Key"
Matt