add the login/logout function
Merge pull request #14 from lucknessbuaa/master

add the login/logout function