ENH: added login/logout functions