'Registers a new user with given localpart
Returns:
Deferred: a 2-tuple of (user_id, access_token)'

def register(self, localpart):

    reg = self.hs.get_handlers().registration_handler
    return reg.register(localpart=localpart)
