changed foreign key constraints for account_id to email attribute