bug fixes

- fixed a bug in getPortalIDs
- fixed a bug in getAllPortals
- added function openPortal (not finished yet)