Revert "Revert "Added a log out button""

This reverts commit d485b0c49863706616fb29fddf461e643cc1bd83.
Added functionality for logging out