Fix scope, redirect_uri, error handling