fixed header already sent problem, session now works fine