added logout option
moved auth into done