created app.js and locale for public; removed redundant code in app.js for admin