fix login & registration bug