diff --git a/server/login/login.go b/server/login/login.go
index aff58cad3af3687ac699783f7e55377660d1cd83..1744c7db114a9bc12c73dada3253ace9540f763f 100644
--- a/server/login/login.go
+++ b/server/login/login.go
@@ -23,17 +23,17 @@ const maxFailures = 5
 
 type Auth struct {
 	// True if the user is authenticated.
-	Authenticated bool
+	Authenticated bool `json:"a"`
 
 	// Deadline until authentication will need to be renewed.
-	Deadline time.Time
+	Deadline time.Time `json:"d"`
 
 	// User name and other information (like group membership).
-	Username string
-	UserInfo *auth.UserInfo
+	Username string         `json:"u"`
+	UserInfo *auth.UserInfo `json:"ui"`
 
 	// Services the user has logged in to from this session.
-	Services []string
+	Services []string `json:"sv,omitempty"`
 }
 
 // AddService adds a service to the current session (if it's not
@@ -51,10 +51,10 @@ type loginSession struct {
 	Auth
 
 	// Temporary fields required by the login process.
-	Password     string
-	AuthResponse *auth.Response
-	Redir        string
-	Failures     int
+	Password     string         `json:"p"`
+	AuthResponse *auth.Response `json:"ar"`
+	Redir        string         `json:"r"`
+	Failures     int            `json:"fail"`
 
 	// Implementation detail of the session layer.
 	deleted bool