starting to refactor jwtauth