Added is-authenticated function to server.