Add login and logout. close #30 close #31