fixes email validation and view templates