fixed headers already sent error occurring on login
added ability to download graphs