Auto-login after registration complete?

How can I have a user logged in automatically after sign up is complete? I tried using this code here - https://premium.wpmudev.org/forums/topic/auto-login#post-130552 (as both a plugin and in my functions.php) but it doesn't want to work for me.

I am running the latest version of WP and the WPMU Membership plugin.