This function sends an asynchronous request to the server's login endpoint with the user's
email and password. If the login is successful, it stores the received authentication token
in secure storage and returns a success message. Throws an error if the login fails for any
reason, including server errors or incorrect login details.
Handles user login.
This function sends an asynchronous request to the server's login endpoint with the user's email and password. If the login is successful, it stores the received authentication token in secure storage and returns a success message. Throws an error if the login fails for any reason, including server errors or incorrect login details.
login