Ok, so it is happening not only for this issue with logging out, but it is happening for logging in as well. Line 83 for logout and line 239 for login. I get a blank page when clicking on upload and publish. I had an error in the Write Post page that said it could not find the header, but I fixed that (the problem with the header was fixed after the other problems so no I am not an idiot). :)
Please help me, I'm actually going nuts over this and I am getting super annoyed. so PRETTY PLEASE help me.