detecting 401 and return error
Merge pull request #9 from behrica/master

detecting 401 and return error