changed login to be more javascript.