logout method crash

when user not login, call logout method will crash