fix roles fetching and login order