added functional method for logging out, hope its sufficient