throw exception when not logged in