Added authentication hooks to Perform. Needs testing.