fix register and login status