Revert "Use cookies instead of sessions"

Only start session if it hasn't been started already. Also, utilise set_pref().

This reverts commit 4910293723b84994661cadd068e325d13d23296f.
Partially revert "Helps if cookies aren't secure only"

(commit 5ae1b388f3c9aaa26025e02e254295f9275fdf3d). Retain error display.
First pass at eradicating error messages

Remove 'non-static method cannot be called statically' errors, among others.