Advanced javascript password field