Added logout function to login service.