Fixed user session stuff which was broken