clean unnecesary code from RegisterController