Implement basic sing-in and sign-out function.

Change-Id: I924058996c21f1b23f22a92ac9f293eb1c7b4b0c
Signed-off-by: Wei-Chung Wen <morisato3711@gmail.com>