added session stuff to controller