fixed authentication issue
tidy