Just example of autorization logic (Delphi)