set up app locals, login header, validation for register and login