Included render functions for templates and made username etc. persistent upon unsuccesful POST