various login stuff, plus some generated code