refactor login/logout views