Replace the login with pure SQL query.