implement the full login funtion.
fix login password not correct bug.