Finish login page and fix some bug.