bug fix on authentication