Added feature to prevent duplicate registrations