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 – (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.