Refactor login-audit