fix bug
change session to cookies