conversion form jquery to javascript

some events on register or login area, moved from jquery to javascript,
for fun.