added configurable logout option