made changes to RegisterController