Fixed state problem
Fixed auth bug