changed logout to have optional paremeters for android