login and validate login