changed so session can be destroyed when logging out
fixed merge