Manchester United secured a thrilling 2-1 win over Rangers thanks to skipper Bruno Fernandes' strike in injury time.