adapt to work with token authentication