Test logout api and add userfunction.js