fixed authentcation bug