Don't make the username and password part of an id. (There can only be one id per class...) Assign a unique constraint to the properties:
Code:
<property name="UserName" column="username" type="string" unique="true"/>
This ensures that no two usernames exist that are the same.
If you want the combination of two properties to be unique, you can create multi column indices like so:
Code:
<property name="foo" type="string">
<column name="foo" unique-key="foo-bar-key"/>
</property>
<property name="bar" type="string">
<column name="bar" unique-key="foo-bar-key"/>
</property>