Refactor a bit to de-duplicate code.
Make the Json.aspx authentication somewhat less broken.
Use Authentication.CreateLogin instead of rolling my own.
Add Authentication.CreateLogin to Web.UI
Indentation