(feat) add changes to authFactory at logout to modularize the functions