template and user session fixes
fix 404 script