                                                     </script>
                                                     <body></body>
                                                 </html>'
-                                                        
+                                       ###             
                                     else
                                         utils.log response
                                         res.send "Invalid response."                            
                 else
                     utils.log "No token"
                     res.send "Could not connect to Twitter."
-            else
-                next err                
+            catch e
+                next e)()               
                 
 
 

                            </html>"
                    catch e
                        next e)()


    
    twitterCallback: (req, res, next) =>
        oa = new OAuth(
	        "https://api.twitter.com/oauth/request_token",
	        "https://api.twitter.com/oauth/access_token",
	        conf.authenticationTypes.twitter.TWITTER_CONSUMER_KEY,
	        conf.authenticationTypes.twitter.TWITTER_CONSUMER_SECRET,
	        "1.0",
	        conf.authenticationTypes.twitter.TWITTER_CALLBACK,	
	        "HMAC-SHA1"
        )
        models.Token.get { type: 'oauth-process-key', key: req.cookies.oauth_process_key }, {}, db, (err, token) =>            
            if not err
                if token
                    oauth = token.value
                    oauth.verifier = req.query.oauth_verifier

                        else
                            utils.log "Twitter: authenticated #{results.screen_name}"
                            
                            response = ''            
                            
                            https.get "https://api.twitter.com/1/users/lookup.json?screen_name=#{results.screen_name}", (_res) =>
                                _res.on 'data', (d) =>
                                    response += d                                    
