Refactor login to use iframe.