added possility to receive device ID and token externally