Patched issue #89

Added check for missing `grant_type` as per the suggested fix in issue #89.