start of server logic for browser frontend. Will work in dev branches from now on