When profile template is injected, save the current parent element to replace it with the login form