Check user credentials when aurthenticating