the function of login, loginout and register has been finished