Bug fixing on Authentication methods