> For the complete documentation index, see [llms.txt](https://docs.raydius-research.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raydius-research.com/core-concepts/raydius-sdk/social-login-sdk/raydius-react-sdk/example-scenarios.md).

# Example Scenarios

**Logging In a User**

To log in a user, you can use the `login` method from the `useRaydius`hook:

```typescript
import React from 'react'
import { useRaydius } from '@raydius/react'

export default function LoginComponent() {
  const { login } = useRaydius()

  return (
    <button onClick={login}>Login</button>
  )
}
```

**Logging Out a User**

To log out a user, you can use the `logout` method from the `useRaydius` hook:

```typescript
import React from 'react'
import { useRaydius} from '@raydius/react'

export default function LogoutComponent() {
  const { logout } = useRaydius()

  return (
    <button onClick={logout}>Logout</button>
  )
}
```

**Linking a Wallet**

To link an additional wallet to a user's account, you can use the `linkWallet` method from the `useRaydius` hook:

```typescript
import React from 'react'
import { useRaydius} from '@raydius/react'

export default function LinkWalletComponent() {
  const { linkWallet } = useRaydius()

  return (
    <button onClick={linkWallet}>Link Wallet</button>
  )
}
```
