Simplify code of oauth panels.