some fixes & oauth error handling