fix errors
migrated PortalUsers to database