finished the login part & fixed a register bug issue #2