fixed bugs on auth initing