added authentication
bug fix