Refactor getJWT()