added failure redirect
Added framework for EJS