Change authorization and authentication method, add fix test

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>