## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on updating authentication logic to switch to the proper chain before signing payloads.
### Detailed summary
- Updated `getLoginPayload` to include `chainId` parameter
- Added logic to switch to the correct chain before signing payloads
- Updated initialization of `thirdwebAuth` to handle chain switching
- Imported `getCachedChain` function in `useSiweAuth.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->