Login and syncing server logic