authenticate using db data