Fix React hooks errors and improve navigation handling in admin pages

Refactor `Login.tsx` and `AdminLayout.tsx` to resolve React hook violations by moving `useForm` and navigation logic within `useEffect` hooks, ensuring consistent hook execution and preventing runtime errors.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: c5af034d-b52a-4cef-b5d9-d4bf1ba738e5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 3dd335b8-f7a7-4d50-b7b5-8782950aaa3f
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/25db4a16-9d7a-4372-855d-284586dafab2/c5af034d-b52a-4cef-b5d9-d4bf1ba738e5/UbMLECX
Replit-Helium-Checkpoint-Created: true
