public function getConnect($provider = null)
	{
		if (empty($provider)) {
			App::abort(404);
		}
		
		$referer = Request::header('referer', '/');
		$referer_parts = parse_url($referer);
		$onboth = array_get($referer_parts, 'path');
		if (array_get($referer_parts, 'query')) {
			$onboth .= '?' . array_get($referer_parts, 'query');
		}
		
		if (!Input::get('code') && !Input::get('oauth_token')) {
			Session::put('mmanos.social.onsuccess', Input::get('onsuccess', $onboth));
			Session::put('mmanos.social.onerror', Input::get('onerror', $onboth));
		}
		
		if (!Auth::check()) {
			return Redirect::to(Session::pull('mmanos.social.onerror', '/'))
				->with(
					Config::get('laravel-social::error_flash_var'),
					'There was a problem connecting your account (1).'
				);
		}
		
		if (Input::get('denied') || Input::get('error')) {
			return Redirect::to(Session::pull('mmanos.social.onerror', '/'))
				->with(
					Config::get('laravel-social::error_flash_var'),
					'There was a problem connecting your account (2).'
				);
		}
		
		$provider = ucfirst($provider);
		
		try {
			$service = Social::service($provider);
			
			if (Config::get('laravel-social::providers.' . strtolower($provider) . '.offline')) {
				$service->setAccessType('offline');
			}
		} catch (Exception $e) {
			App::abort(404);
		}
		
		if (2 === Social::oauthSpec($provider)) {
			return $this->oauth2Connect($provider, $service);
		}
		else {
			return $this->oauth1Connect($provider, $service);
		}
	}