check credentials on state change