Hi,
According to response code 401, it means that you are not able to login successfully to your website.
Please check the response data of your login request in order to confirm it.
Personally, I would say that when you launch the homepage URL, it will generate a cookie or an hidden key(token) which will be used in login request.
Regards.