You can use the built in wordpress function wp_signon
.
/// Auto login new user
$creds = array();
$creds['user_login'] = $username;
$creds['user_password'] = $userpass;
$creds['remember'] = true;
$user = wp_signon( $creds, false );
if ( is_wp_error($user) )
echo $user->get_error_message();
$username
and $userpass
would be posted data from your register form.
Check the wordpress codex for full details.