Britain's parliament was hit by a cyber attack on Saturday in which hackers tried to access email accounts.