Script breaks on logout bugfix
Added references