login/logout best architecture approach searching