code: def login():
      
      req = flask.request.get_json(force=True)
      username = req.pop('username', None)
      password = req.pop('password', None)
  
      user = guard.authenticate(username, password)
      ret = {'access_token': guard.encode_jwt_token(
          user,
          firstname=user.firstname,
          nickname=user.nickname,
          surname=user.surname,
      )}
  
      return (flask.jsonify(ret), 200)
docs: Logs a user in by parsing a POST request containing user credentials and
      issuing a JWT token.
  
      .. example::
         $ curl http://localhost:5000/login -X POST \
           -d '{"username":"Walter","password":"calmerthanyouare"}'