Server-side client-side and custom authentication flows