fix auth & reg