Update sync in app.js; cleanup login stuff