Move code for auto-logging-in after registration into the UserManager.