modify base.js and index.js
==============================
1. add function validEmail and validPasswd
2. test all function in base.js