Basically to log a user in you can use:
//Login the user
$creds = array();
$creds['user_login'] = $login;
$creds['user_password'] = $password;
if ( !empty( $remember ) ){
$creds['remember'] = true;
}
$user = wp_signon( $creds, true );
but that is only when you have the password and login
so you can create your own register form and process it and create the user yourself
//Only after Everything has been validated, proceed with creating the user
//Create the user
$user_pass = wp_generate_password();
$user = array(
'user_login' => $username,
'user_pass' => $user_pass,
'first_name' => $firstname,
'last_name' => $lastname,
'user_email' => $email
);
$user_id = wp_insert_user( $user );
/*Send e-mail to admin and new user -
You could create your own e-mail instead of using this function*/
wp_new_user_notification( $user_id, $user_pass );
and here we have both login and password so you can log the user in.
Hope this helps