fix auth system