I have a login form which on click calls the following function.
getting the data from laravel API if OnSuccess store the user information on the localStorage and th