My current function handleLogin() takes care of calling to an API that sets the state of loggedIn to true inside the then() block like so.
function handleLogin()