add metadata check on login