First version of the database authentication