Fix logging out bug 7

This PR closes #7