Added features to validate login credentials