auth database code
