finished the login and regist