OrbitLens
Legal implications definitely should be considered. The signing itself is very simple and robust way to confirm the identity or secret key ownership, so I don't want to give up on it so easily.
You are absolutely right. This is precisely the reason why they start to be considered a legal proof of identity/ownership by administrations.
Using it as a login/authentication means is great: it is clearly something we want to do. It is done right only if it doesn't collide with legal use cases that we'll need to support as well at some point (contract signing).
For login a number big enough to prevent collision appended to the site domain is enough: you don't need to accept any abritrary data and you can specify the number to be a certain length that is not 256. This also have the benefit that external service would more likely use the feature in a proper way.
keypair.sign(keypair.publicKey() + message)
This works as long as you enforce message to be non-empty (or the DKIF weakening attack is possible again).
Maybe
keypair.sign(domain + message)
Would do better. It also greatly reduce chances of collision, because no cross-domain collision could happen anymore. This imply that requester website let the document.referer field set. I'm not sure if it can be handled properly by installed software/applications, though.