complete login and regist