fixed all login and register issues