login finish and some bugs fixed