rearranging and stubbing for JWT