If you are performing some operations during modules editing such as access the media manager component of Joomla! to upload images, it could be the case that an error message will show up as:'You are not authorized to view this resource'
This happens because Visual Styles Modules works using a bridge between backend and frontend side to edit modules on the live frontend template. When accessing the media manager component during modules editing, default permissions of Joomla! requires that you are logged in even in the frontend side with a valid user and permissions.
If you prefer not login to frontend, another solution would be grant permissions to guest users to the media manager component as in the following screenshot.