fix create bug and implement log in