extracted login/logout methods in a new module