Fixed issues on Authentication. Part2.