Added use of endSession method to remove ID from Security.user array list
Minor structure changes and inclusion of (commented out) error page redirections
Stability improvements to endSession method