make home and registration inherit each other

removed duplicated code and made them look the same