Delete Repeated code of Registration