No error was being displayed for invalid redirect_uri. Added it.