Fix jsp and logout (all by Noki)