Fixed bug with logging out.