added login and logout Closes #2