Since there's the potential to leave the site after the registration, i'd use a cookie to store the login information. You'll need to store the activation link in the the user's table, so you'll have something to compare it against. When the person clicks the link, run an update query to set the activation column to 1 and set the code to NULL.