Users unable to login

Permalink
So here's an interesting problem:

I have code on my site which allows c5's default superadmin user to add other administrators, and these administrators can add regular users. I'm pretty sure there's nothing wrong with the code, as the users added in this way are visible both on concrete's mysql database AND from within the dashboard. The issue is that these users are unable to login to the site; when they try, they get an 'invalid username or password' error. More interestingly, these users CAN be logged in from within the dashboard. Here's the code that I'm using to add users:
$newAdminData = Array(
   'uName' => $un,
   'uEmail' => $em,
   'uPass' => $pw);
   $newAdmin = UserInfo::add($newAdminData);
   $group = Group::getByName('Administrators');
   $newAdmin->getUserObject()->enterGroup($group);

If anyone has any ideas as to what could be causing this odd behaviour, I would really appreciate it!