def launch(cls, runtime='xul', **runtime_kwargs):
    if isinstance(cls, str):
        return webruntime.launch(cls, runtime, **runtime_kwargs)
    if not (isinstance(cls, type) and issubclass(cls, Model)):
        raise ValueError('runtime must be a string or Model subclass.')
    
    # Create session
    serve(cls)
    session = manager.create_session(cls.__name__)
    
    # Launch web runtime, the server will wait for the connection
    _server_open()
    host, port = server.serving_at
    if runtime == 'nodejs':
        all_js = session.get_js_only()
        url = '%s:%i/%s/' % (host, port, session.app_name)
        session._runtime = launch('http://' + url, runtime=runtime, code=all_js)
    else:
        url = '%s:%i/%s/?session_id=%s' % (host, port, session.app_name, session.id)
        session._runtime = launch('http://' + url, runtime=runtime, **runtime_kwargs)
    
    return session.app
Pulled from django contrib so that we can add user into the form
dataset/ETHPy150Open zoofIO/flexx/flexx/app/funcs.py/launch--crossover with--dataset/ETHPy150Open mozilla/addons-server/src/olympia/users/views.py/unsubscribe