Millions of people were left without access to online benefits and pensions services when they found they were unable to log in.