         gutil.log(stdout)
         gutil.log('done')
 
+
+handleRequestError = (err, httpResponse) ->
+    gutil.log('err: ', err)
+    gutil.log('status code: ', httpResponse.statusCode)
+
 LOGIN_URL = 'http://igem.org/Login'
+LOGOUT_URL = 'http://igem.org/cgi/Logout.cgi'
 # Login and call the callback with the cookie jar
 login = (cb) ->
     username = readlineSync.question('Username: ')

        url: LOGIN_URL,
        method: 'POST'
        form: {
            id              : '0',
            new_user_center : '',
            new_user_right  : '',
            hidden_new_user : '',
            return_to       : '',
            username        : username,
            password        : password,
            Login           : 'Log+in',
            search_text     : ''
        },
        jar: jar

                parser.write(body)
                parser.end();

                multiform['wpTextbox1'] = fs.readFileSync('build-live/Team.html', 'utf8')

                request {
                    url      : 'http://2015.igem.org/Team:Toronto/Team?action=submit'
                    method   : 'POST'
                    formData : multiform
                    jar      : jar
                }, (err, httpResponse, body) ->
                    if !err and httpResponse.statusCode is 302
                        # Follow redirect to new page
                        request {
                            url: httpResponse.headers.location
                            jar: jar
