connect user and state