changed authentication method and protected some methods