auto signin && fix some bugs