'use client' import { signIn } from 'next-auth/react' import { Button } from '@/components/ui/button' import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { useRouter, useSearchParams } from 'next/navigation' import { useState, Suspense } from 'react' import { Monitor, Shield } from 'lucide-react' function LoginForm() { const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [error, setError] = useState(null) const [isLoading, setIsLoading] = useState(false) const router = useRouter() const searchParams = useSearchParams() const invited = searchParams.get('invited') const handleLogin = async (e: React.FormEvent) => { e.preventDefault() setIsLoading(true) setError(null) const result = await signIn('credentials', { email, password, redirect: false, }) if (result?.error) { setError('Invalid email or password') setIsLoading(false) } else { router.push('/dashboard') router.refresh() } } return ( Welcome back Sign in to access your remote machines {invited && (

Account created! You can now sign in.

)}
setEmail(e.target.value)} className="bg-secondary/50" />
setPassword(e.target.value)} className="bg-secondary/50" />
{error && (

{error}

)}
Access is by invitation only
) } export default function LoginPage() { return (
RemoteLink

Professional Remote Desktop Solution

Securely connect to and control remote machines. Perfect for IT support, system administration, and remote assistance.

End-to-end encrypted connections
RemoteLink

Self-hosted remote desktop. End-to-end encrypted.

) }