Registration with data base, and testing the athentication