Added check for autologin cookie before trying to validate