fix for #17 - handle token error

also provide more details in http response