some fixes with login and registration