Redirect uri error

This is a proposal to solve Issue #162