some more error checking in veriofy credentials (possibly not working yet)