added logout, jump to query when logged in