fix bugs and Authentication added