Refactored initializePageStateFucnction

The function was doing too many things at once.
fixed typo
Added help/title to class selector

New java programmers may not know what this is supposed to represent. A
link to a page describing how to find the applet's entry class is ideal.
Changed logout redirect to main page
fixed typos