Fixed bug in  Authentication