Login & register function

Signed-off-by: August Yip <augustyip@gmail.com>