It sounds like the same issue i had, its logging you out as the user is just a room admin and not a server admin.
goto your databas and run this
UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
obviously change the last bit to the user name of the user you want to make a server Admin
Source: https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/index.html