session bugs

Fix session bugs and keys