fix reg & auth