title: wp_generate_password returns password but can't login using it
body: <p>Im creating a simple login/registration page incorporating user moderation and bootstrapping wp for the heavy lifting.</p>
  
  <p>I can get the new user added to the db and a password gets created and hashed and all, but when i go to login w/ that account the password won't work. i'm stumped...</p>
  
  <p>However, when i go into the admin under my admin account and change the password for the user it allows me to login just fine...</p>
  
  <p>Anyone see anything i'm missing?</p>
  
  <pre><code>require_once( ABSPATH . WPINC . '/registration.php' );
  $user_pass = wp_generate_password();
  $userdata = array(
    'user_pass' =&gt; $user_pass,
    'user_login' =&gt; esc_attr( $_POST['user_email'] ),
    'user_email' =&gt; esc_attr( $_POST['user_email'] ),
  );
  
  if( !$userdata['user_login'] )
    $error .= __('An Email Address is required for registration.', 'frontendprofile');
  elseif ( username_exists( $userdata['user_login'] ) )
    $error .= __('Sorry, that Email Address is already in use for another account.', 'frontendprofile');
  elseif ( !is_email( $userdata['user_email'] ) )
    $error .= __('You must enter a valid Email Address.', 'frontendprofile');
  elseif ( email_exists( $userdata['user_email'] ) )
    $error .= __('Sorry, that Email Address is already for another account.', 'frontendprofile');
  
  else{
    $new_user = wp_update_user( $userdata );
  }
  </code></pre>