function Redirect (idtype) {
	console.log(idtype);
	console.log('redirect');
	switch ( idtype )
	{
	case "ADMIN":
		console.log('admin role');
		break;

	case "WORKER":
		console.log('worker role');
		switch ( location.pathname )
		{	
			case "/errors/404":
			case "/logout":
			case "/worker/dashboard":
			case "/worker/profile/edit":
			case "/worker/progress":
			case "/worker/calendar":
			case "/worker/travel":	
			case "/worker/tutorials":
			case "/worker/messages":
			case "/worker/messages/view":
				break;

			default:
				location.pathname = "/worker/dashboard";
		}
		break;

	case "SUPPLIER":
		console.log('supplier role');
		switch ( location.pathname )
		{	
			case "/errors/404":
			case "/logout":
			case "/supplier/dashboard":
				break;

			default:
				location.pathname = "/supplier/dashboard";
		}
		break;

	case "CLIENT":
		console.log('client role');
		switch ( location.pathname )
		{	
			case "/errors/404":
			case "/logout":
			case "/client/dashboard":
			case "/client/worker/view":
			case "/client/worker/list":
			case "/client/progress/list":
			case "/client/progress/show":
				break;

			default:
				location.pathname = "/client/dashboard";
		}
		break;

	case "DRIVER":
		switch ( location.pathname )
		{
			case "/errors/404":
			case "/logout":
			case "/driver/dashboard":
				break;

			default:
				location.pathname = "/dashboard/";
		}
		break;

	default:
		console.log('default role');
		switch ( location.pathname )
		{
			case "/login":
			case "/":
			case "/contact_request":
				break;
			
			default:
				location.pathname = "/login";
		}
	}

	SetupPage();

}