simplified code; removed login.js