wire up auth logic