User session bug fix