added check for auth type