code: def check_auth(username, password):
      
  
      with open(os.path.expanduser("~/config/.note.conf")) as fd:
          config = json.loads(fd.read())
  
      try:
          u = config['server']['login']['username']
          p = config['server']['login']['password']
      except KeyError:
          print "cannot start server"
          sys.exit(1)
  
      return username == u and password == p
docs: This function is called to check if a username /
      password combination is valid.