fix bugs and add sign in form