getting session correctly