Finished refining logout process
Merged logout changes to master