convert native remote authentication usage to JWT

@jwswj is there a test environment I can try this in?

cc @morten