Migrate users from Drupal 5 to Drupal 7
Upgrade from Drupal 5 to 6, then from 6 to 7. That's it. No further modules or writing your own code is needed, users and content will migrate just fine. You only need Migrate and other modules if you have some special stuff on your site, like Organic groups. CCK version 7 will be needed in most cases, but that's all in the documentation.

Here's the documentation, follow carefully:

From 5 to 6: https://drupal.org/documentation/upgrade/5/6

From 6 to 7: https://drupal.org/documentation/upgrade