Added fully working user session handling