add console and login-logout logic