Update last login and validate login on page load