Add refresh token to credentials sample file
Fix validation logic, http response handling and add response helpers