fix register/login interaction