Made register work only once

and record the user against the invitation