Adds basic session functionality (still buggy)