checking credentials