Added logout method, closes #4