The login() method sends all user data to the frontend.