Added user editing.
Wrapped around render_template to reduce reduncancies.
Changed logged_in checks in admin pages to privilege level checks.