Creating an APEX custom authentication procedure