'Login as a specific user: "login @bob:localhost"
You MAY be prompted for a password, or instructed to visit a URL.'

def do_login(self, line):

    try:
        args = self._parse(line, ['user_id'], force_keys=True)
        can_login = threads.blockingCallFromThread(reactor, self._check_can_login)
        if can_login:
            p = getpass.getpass('Enter    your    password:    ')
            user = args['user_id']
            if (self._is_on('complete_usernames') and (not user.startswith('@'))):
                domain = self._domain()
                if domain:
                    user = ((('@' + user) + ':') + domain)
            reactor.callFromThread(self._do_login, user, p)
    except Exception as e:
        print e
