Added functionality for the user logging out.