added loging.js and added some login functionality