public function handlePost($get, $post, $files, $cookies)
 {
     session_start();
     if (!isset($post['host'])) {
         throw new \Exception('HOST is missing');
     }
     if (!isset($post['name'])) {
         throw new \Exception('NAME is missing');
     }
     if (!isset($post['user'])) {
         throw new \Exception('USER is missing');
     }
     if (!isset($post['pass'])) {
         throw new \Exception('PASS is missing');
     }
     if (!isset($post['prefix'])) {
         throw new \Exception('PREFIX is missing');
     }
     if (!isset($_SESSION['openid_identity'])) {
         throw new \Exception('OpenID login is missing');
     }
     Models\Database::$dsn = "mysql:host={$post['host']};dbname={$post['name']}";
     Models\Database::$username = $post['user'];
     Models\Database::$password = $post['pass'];
     Models\Database::$prefix = $post['prefix'];
     Models\Database::setupTables();
     Models\Preferences::setFactoryDefaults();
     Models\User::userWithOpenId($_SESSION['openid_identity'], $_SESSION['openid_email']);
     Models\Database::update('users', ['auth' => 5], 'email="' . $_SESSION['openid_email'] . '"');
     //todo security
     header('Location: ' . MainPageController::getUrl());
     //todo URL / url http://www.teamten.com/lawrence/writings/capitalization_of_initialisms.html
 }