added function to dbAccess for checking password