login and validate login methods