Added some authentication code.