record username & password
fix some bug