Adding session validation