Prevent server crash on username duplicate

Prevent server crash on username duplicate