refactor for JWT
merge