Fixed Parse init error

Moved Parse init code from header.js to main.js since it is only needed
in the main page.