fixed javascript things. added event.preventdefault to function login

also I did other stuff