Added loginProvider as a parameter to the query on perform_check