Login & register patch