Added user session functionality