added check.php to validate login credentials