This can be reproduced locally (without CentralAuth) or on the Wikimedia clusters (beta or prod). For example, visit:
or:
It should preserve the returnto, but it redirects to:
http://en.wikipedia.beta.wmflabs.org/wiki/Special:UserLogin/signup
Version: 1.22.0
Severity: normal