full registration implimentation with proper validation