cleaned
moved login code into login.js