I have the following code from my state to handle the login request and load the incoming data to state.