code changes for validate login