Add Login and Logout function

Signed-off-by: shajou <doshajou@gmail.com>