Add registration logic