Fixed session problem, fixed identation in view function