Port over new login template changes (#168 and others)