update new code about auth and user