isLoggedIn())
			throw new NotAllowedException('You need to be logged in to view this page.');
		parent::__construct('Account settings');
		$form_title = 'Account settings';
		// Session checking!
		if (empty($_POST))
			Session::resetSessionToken();
		else
			Session::validateSession();
		$fields = [
			'first_name' => [
				'type' => 'text',
				'label' => 'First name',
				'size' => 50,
				'maxlength' => 255,
			],
			'surname' => [
				'type' => 'text',
				'label' => 'Family name',
				'size' => 50,
				'maxlength' => 255,
			],
			'emailaddress' => [
				'type' => 'text',
				'label' => 'Email address',
				'size' => 50,
				'maxlength' => 255,
			],
			'password1' => [
				'before_html' => '
To change your password, please fill out the fields below.