Add login/logout functions
Merge remote-tracking branch 'origin/master'