authentication hooks